lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dror Matalon <d...@zapatec.com>
Subject Re: Returning one result
Date Fri, 05 Dec 2003 22:45:24 GMT
On Fri, Dec 05, 2003 at 05:28:54PM -0500, Erik Hatcher wrote:
> 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?!  :))

You're right :-). What I should have said instead is:
Please show the output of query.toString()
which will tell us what the query really is.

But in the end, your approach is much better. Get the education from
these excellent articles, check out the javadocs, and things should fall
into place.

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: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

-- 
Dror Matalon
Zapatec Inc 
1700 MLK Way
Berkeley, CA 94709
http://www.fastbuzz.com
http://www.zapatec.com

---------------------------------------------------------------------
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