lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karsten Konrad" <Karsten.Kon...@xtramind.com>
Subject AW: Query string
Date Fri, 02 May 2003 11:48:59 GMT

Hi,

To 1: what analyzer are you using? Some analyzers filter out numbers;
the empty disjunction you get then can never be met by any document.

To 2.: Depends on how often you find 10, 60 or 100 in your documents
as identifier, and how often your searchtext occurs. In general:
using the big query should be much faster, as access to the identifier
will generate more file access operations (if there is any number
of result documents to speak of).

Regards,

Karsten

-----Urspr√ľngliche Nachricht-----
Von: mganesh [mailto:mganesh@newgen.co.in]
Gesendet: Freitag, 2. Mai 2003 13:21
An: Lucene Users List
Betreff: Query string


 Hello,
 Im having two fields identifier and contents. Both are indexed.
 I have to search on both fields.
 
1.  My search string is (Contents:searchtext) AND (identifier:10 OR identifier:60 OR identifier:100)

     But im not getting any results from the above query. 
     If i do query.toString("Contents") then only +Contents:searchtext +() gets printed.
     If im using TermQuery for each term and if i combine using BooleanQuery then everythin
works fine.
     I don't know where im wrong.

2.  which will be faster
     a. Executing a big query ex:(Contents:searchtext) AND (identifier:10 OR identifier:60
OR identifier:100 ......................... ) 
     b. Searching Contents from Lucene and fitering the results with the identifier.

3. If i want the results sorted in identifier then what should i do??

please send me some suggestions.

regards
ganesh

 

 

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message