Ir al contenido principal.
Enlaces relacionados:  Presse  Société  Clientes  Nous contacter
Solsoft

Forum

Problem with boolean AND while searching in all fields


Auteur Message
le: 10. 02. 2005 [05:57]
shilpa_deodhar31@yahoo.com
Shilpa Deodhar
Auteur du fil
Inscrit depuis: 31.12.1969
Interventions: 0
Hi

I solved the problem of queries, and i got the correct
format of the queries for searching in particular
fields.

Now another problem has aroused that I want a random
search page where the user can search for any term in
any field and the term can have all combination of
boolean opetators AND, OR and NOT.

The problems I found are

1. For particular single search term (eg. mangrove$ )
the query shows less number of records. ie my database
has 1400 records while for mangrove$, it retrieves
only till mfn 257, while there are more that that
number of records having mangrove$.

2. If my search term has boolean AND (eg. goa$ and
india$) <b>and i m searching in all fields</b>, my
query is
"goa$" * "india$"
suppose the results retrieved are 14
while if I give search term as india$ and goa$ then my
query is
"india$" * "goa$"
the records retrieved are 38.

this problem arises only if the search is in all
fields.

I think this is because in the first case goa$ and
india$, the query searches for goa$ first and then
searches for india$ after the occurance of goa$ in
that record, ie the search for india$ beginns from the
point where goa$ is found in the record. And thus the
records having india$ first and then goa$ somewhere
after that are missed out.

Is there a way to start the search for the second term
from the beginning of the record?
Please help.

shilpa




__________________________________
Do you Yahoo!?
Yahoo! Mail - Easier than ever with enhanced search. Learn more.
http://info.mail.yahoo.com/mail_250

------------------------------------------
Posted to Phorum via PhorumMail
le: 10. 02. 2005 [06:53]
paul@malete.org
Klaus Ripke
Inscrit depuis: 31.12.1969
Interventions: 0
Hi

On Thursday 10 February 2005 11:57, Shilpa Deodhar wrote:
> 1. For particular single search term (eg. mangrove$ )
> the query shows less number of records. ie my database
> has 1400 records while for mangrove$, it retrieves
> only till mfn 257, while there are more that that
> number of records having mangrove$.
This indicates that those records probably have
multiple occurences of mangrove.
The SETLEN first limits the number of hits,
which may finally result in a smaller number of records.

Solution: #define OPENISIS_SETLEN 50000
(you will need 8*SETLEN bytes of RAM)


> I think this is because in the first case goa$ and
> india$, the query searches for goa$ first and then
> searches for india$ after the occurance of goa$ in
> that record, ie the search for india$ beginns from the
> point where goa$ is found in the record.
No, it's independent of the point occurence.

The query first selects up to SETLEN hits for the first term
and then checks records from this set of hits for the second
term. Fixed by increasing SETLEN.

Anyway it's always more efficient to use more specific terms first
(which are matching less records).


cheers

------------------------------------------
Posted to Phorum via PhorumMail



Mot de passe oublié ?

Veuillez saisir votre nom d'utilisateur ou votre email. Les instructions nécessaires à la réinitialisation de votre mot de passe vous seront immédiatement envoyées par mail.
Réinitialiser le mot de passe

Retourner au formulaire d'identification 


Copyright © 2003-2009, Solsoft de Costa Rica S.A.
Charte de confidentialité