Re: Phrase query on multiple fields

2011-01-22 Thread amg qas
Thanks Ian. The alternative approach you have mentioned works for me. -amg On Thu, Jan 20, 2011 at 6:59 AM, Ian Lea wrote: > No and No. > > Alternative approaches might include building a general "contents" > field holding any/all searchable fields or building up the query > yourself.  The latte

Re: Phrase query on multiple fields

2011-01-20 Thread Ian Lea
No and No. Alternative approaches might include building a general "contents" field holding any/all searchable fields or building up the query yourself. The latter is quite straightforward: BooleanQuery bq = new BooleanQuery(); PhraseQuery pq1 = ...; PhraseQuery pq2 = ...; bq.add(pq1, ...);

Phrase query on multiple fields

2011-01-19 Thread amg qas
Hi, I have two question regarding phrase query : 1) How can I execute a phrase query over multiple fields ? I can only get PhraseQuery to work over a single field - For eg something like this : PhraseQuery query = new PhraseQuery(); query.setSlop(1