lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fang...@emc.com
Subject RE: How to search both Tokenized and Untokenized fields
Date Thu, 12 Mar 2009 03:32:44 GMT
Hi,

What do you mean untokenized field?

Are you using different analyzer for different field? If yes, I think
you just use the same analyzer (PerfieldAnalyzer, I guess) for query.

Li

-----Original Message-----
From: rokham [mailto:somebodyiknow@gmail.com] 
Sent: Monday, March 09, 2009 11:02 PM
To: java-user@lucene.apache.org
Subject: How to search both Tokenized and Untokenized fields


Hi,

I've been trying to find a way which allows executing a query that
contains
both Tokenized and Untokenized fields on Lucene's index, without having
to
parse the query. I've been able to execute a query which only uses
Tokenized
fields as follows:

   QueryParser queryParser = new QueryParser( DEFAULT_FIELD, analyzer);
   Query query = queryParser.parse(queryString);
   Hits hits = indexSearcher.search(query);

This works fine for Tokenized fields but I'm not sure how to execute a
query
("queryString") which contains both tokenized and untokenized fields.

Any suggestion is very much appreciated.

Rokham
-- 
View this message in context:
http://www.nabble.com/How-to-search-both-Tokenized-and-Untokenized-field
s-tp22413438p22413438.html
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



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