Can you give us more info on what they are searching for w/ 2 letter
searches? Typically, prefix queries that short are going to have a
lot of terms to match. You might try having a field that you index
using a variation of ngrams that are anchored at the first character.
For example, encountering the term Lucene, you would index "lu",
"luc", "luce" all at the same position (this has limits, b/c you will
need an upper bound cutoff too). This way, you would get exact
matches and you don't need to use prefix queries. Then, you just need
to recognize these searches and generate the appropriate queries.
Alternatively, you may consider requiring a minimum number of
characters in a query, but this depends on your application.
-Grant
On Feb 2, 2009, at 2:58 AM, Mittal, Sourabh (IDEAS) wrote:
Hi All,
We face serious performance issues when users do 2 letter search e.g
ho,
jo, pa ma, um ar, ma fi etc. time taken between 10 - 15 secs.
Below is our implementation details:
1. Search performs on 7 fields.
2. PrefixQuery implementation on all fields
3. AND search.
4. Our indexer size is 300 MB.
5. We show only 100 top documents only on the basis of score.
6. We user StandardAnalyzer & StandardTokenizer for indexing &
searching.
7. Lucene 2.4
8. JDK1 .6
Please suggest me how can we improve the performance.
Regards,
Sourabh Mittal
Morgan Stanley | IDEAS Practice Areas
Manikchand Ikon | South Wing 18 | Dhole Patil Road
Pune, 411001
Phone: +91 20 2620-7053
sourabh-931.mit...@morganstanley.com
--------------------------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender.
Sender does not intend to waive confidentiality or privilege. Use of
this email is prohibited when received in error.
--------------------------
Grant Ingersoll
http://www.lucidimagination.com/
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org