lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Range Query Sombody HELP please
Date Wed, 02 Jun 2004 12:46:11 GMT
On Jun 2, 2004, at 6:20 AM, Karthik N S wrote:
> Hey Ype/Erick

If you're gonna ask for help, the least ya could do is spell my name 
correctly :)

> I still have 3 small Questions.
> 1)While creating the Range Query Is it possible for Lucene to do 
> somthing
> similar..
>      +(button AND shirt) +filename:[b10181_p100 TO b10181_p200]
>      [Do you think this will work]  It's not on returning hits , but 
> it does
> return hits with either one of them  "Shirt" or "button" Only.

My guess is you have documents none of your documents in that range 
have button AND shirt in them.

> 2)When the indexer start indexing does it do according to alphabetic 
> order
> or is it some other way...

I don't understand the question, sorry.  Terms in the index are ordered 
lexicographically, if that is what you mean.

> 3)The Field Type  "Keyword"  is not accepting name of Files as it 
> indexes
>    [ Try indexing filenames and then do a search on them ,the hits will
> return u 0 defnitly,  lucene1.3-final version ]
>      doc.add(Field.Text("filename",file.getName()))
>           < --------------------  Will return Hits
>     doc.add(Field.Keyword("filename",file.getName()))
> <--------------------  Will Not return Hits
>  why???

Because of your analyzer.  Try indexing as a Keyword and search using a 
TermQuery.  Don't use QueryParser at first - it gets in the way of 
understanding what is really going on.  For fun, look at the .toString 
of the Query generated by QueryParser if you like.  Look at the 
AnalysisParalysis page on the wiki for more details.  Read my 
articles to get a better understanding.   The short answer is that it 
is analysis that is bogging you down here.

You need to decide how to index file names on how you plan on querying 
for them.  We cannot answer this for you.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message