Hi,
I have an index with some fields which are indexed and un_tokenized
(keywords) and one field which is indexed and tokenized (content).
Now I want to create a Query-Object:
TermQuery k1 = new TermQuery(new Term("foo", "some foo"));
TermQuery k2 = new TermQuery(new Term("bar", "some bar"));
QueryParser p = new QueryParser("content", new
SomeAnalyzer());//same analyzer is used for indexing
Query c =p.parse("text we are looking for");
BooleanQuery q = new BooleanQuery();
q.add(k1, Occur.MUST);
q.add(k2, Occur.MUST);
q.add(c, Occur.MUST);
Is this the best way?
Thank you
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]