> like that above before trying to code it, because the actual
>> query you're making is something like asking for the phrase
>> "word1 in field1 word1 in field2 word2 in field1 word2 in field2"
>>
>> Actually, I can't render the semantics of what you'
There is no option to provide an Occur.SHOULD to the PhraseQuery. So where
does it go? I changed the source to look like this:
PhraseQuery pq = new PhraseQuery();
for (String word : words) {
for (String field : fields) {
pq.add(new Term(field, word));
}
}
Hits hits
Hi,
I want to realize a search that finds the exact phrase I provide. If the
word I am searching for is "green tree", I do NOT want to get results for
"green" or "tree", but only results for "green tree" within the given field.
This doesn't work so far for me. When providing a word that contains