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
: 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
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
> >>
= 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
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
.
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.
--