lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From testn <te...@doramail.com>
Subject Re: Query without Analyzer
Date Tue, 11 Sep 2007 01:47:37 GMT

Alice,

You need to do the following:
- When you create a document, you need to add category id field using
something like
doc.add(new Field(”categoryId”, categoryId, Field.Store.YES,
Field.Index.UN_TOKENIZED));




Alice-21 wrote:
> 
> Hi folks!
> 
>  
> 
> I'm using Lucene to provide search on my application.
> 
>  
> 
> The final query is a BooleanQuery with many fields, there are fields where
> I'll look for the entered keyword and some others to restrict the search,
> as
> the id of a category.
> 
>  
> 
> I read, and seems to be true, that when using TermQuery, it uses the same
> analyzer used when indexing.
> 
>  
> 
> As, there are some fields (like category Id) that I don't want to use the
> analyzer, the result is not what I expect because the term was analyzed.
> 
>  
> 
> My question is: is there any way to search for fields without using an
> analyzer?
> 
>  
> 
> Thank you!
> 
>  
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Query-without-Analyzer-tf4417646.html#a12606415
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message