On May 21, 2007, at 8:39 AM, Rahman Mukras wrote:

Hi all, I would like to add a PhraseQuery to a PhraseQuery so that I can be
able to allow slop between phrases and terms. Something like:

----
PhraseQuery mainPQ = new PhraseQuery();
PhraseQuery subPQ   = new PhraseQuery();

subPQ.add(new Term("contents","great"));
subPQ.add(new Term("contents","actor"));

mainPQ.add(subPQ);
mainPQ.add(new Term("contents","Jean"));
mainPQ.setSlop(20);

You'll need to use SpanNearQuery instead.

        Erik


Reply via email to