On Friday, December 5, 2003, at 04:28 PM, Dror Matalon wrote:
Then I'm out of ideas.  The next thing is for you to post your search
code so we can see why it's not searching the field.

Giving up so easily, Dror?! :))


The problem is, when using any type of QueryParser with a Keyword field, you have to then be careful about analysis. My guess is that at query parsing time, that the analyzer is stripping numbers or in some mangling the "id".

Look back in the e-mail archives for my AnalyzerUtils, run a string containing just a sample id through it using the analyzer you are using in your real code and see what comes out.

Again, Tracy, please read the articles at java.net on Lucene - and there is one on QueryParser too. You are definitely having a learning curve situation here and aren't quite in the zone of Lucene understanding yet, that is why folks here are getting frustrated with your questions. We are hanging in there with you though and will get you through this. I'll give you some pointers here - in the latest Lucene 1.3 versions, there is a PerFieldAnalyzerWrapper that might come in handy here - otherwise you might consider using a different analyzer.

A good first pass is to experiment with the WhitespaceAnalyzer and be sure to phrase your test queries with the same case you indexed with. I believe you'll find that it will work. If it works then, you will have a very good clue that the analyzer is the problem. At that point, go and read those java.net articles I wrote, especially the first one having to do with analyzers.

Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to