RE: How to search both Tokenized and Untokenized fields

2009-03-11 Thread Fang_Li
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 ab

Re: How to search both Tokenized and Untokenized fields

2009-03-11 Thread Chris Hostetter
: Well, PerFieldAnalyzerWrapper is just a bunch of Analyzers,independent of : queries. See the API, but in general : PerFieldAnalyzerWrapper perf = new PerFieldAnalyzerWrapper("default", new : StandardAnalyzer()); : : perf.add("untokenized", new WhitespaceAnalyzer()); : perf.add("tokenized", new

Re: How to search both Tokenized and Untokenized fields

2009-03-11 Thread Erick Erickson
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 > >>

Re: How to search both Tokenized and Untokenized fields

2009-03-10 Thread rokham
= 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") w

Re: How to search both Tokenized and Untokenized fields

2009-03-09 Thread Erick Erickson
hich 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-fields-tp22413438p22413438.html > Sent from the Lucene - Java Users

How to search both Tokenized and Untokenized fields

2009-03-09 Thread rokham
. Any suggestion is very much appreciated. Rokham -- View this message in context: http://www.nabble.com/How-to-search-both-Tokenized-and-Untokenized-fields-tp22413438p22413438.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --