Hi there,

I am using Lucene for an actually quite simple search. I am not indexing long 
texts, but instead each document only has a couple of fields with texts from 
one word to a very short sentence (no more than 6 words usually). Now I need to 
find documents even with only two characters typed in by the user.

So for instance, I have a document with only the fields 'hasName', 
'hasTechName' and the value 'create'. What I need is to find this document, 
when the user typed in 'cr'. But at the moment I would at least have to type in 
'creat'. The query I send to the QueryParser looks like this "hasName:*cr* OR 
hasTechName:*cr*" and I pass true to setAllowLeadingWildcard . For collecting 
the results I use the TopScoreDocCollector.

Any suggestions on where I would have to change something to make my search be 
more "generous"? At the moment I have really no idea what to do...
Thanks, Dennis

Dennis Schmidt
Research Intern
SAP Research Sydney | Level 3, 168 Walker Street | 2065 North Sydney, NSW | 
Australia
mailto:dennis.schm...@sap.com<mailto:dennis.schm...@sap.com>
www.sap.com<http://www.sap.com/>
Please consider the impact on the environment before printing this e-mail.



Reply via email to