Re: querying multi-value fields

2009-10-12 Thread Adriano Crestani
Hi Eric, To achieve what you want, do not tokenize the values you query/add to this field. On Mon, Oct 12, 2009 at 4:05 PM, Angel, Eric wrote: > I have documents that store multiple values in some fields (using the > document.add(new Field()) with the same field name). Here's what a > typical

Re: querying multi-value fields

2009-10-12 Thread Jake Mannix
Or else just make sure that you use PhraseQuery to hit this field when you want "value1 aaa". If you don't tokenize these pairs, then you will have to do prefix/wildcard matching to hit just "value1" by itself (if this is allowed by your business logic). -jake On Mon, Oct 12, 2009 at 1:21 PM,

RE: querying multi-value fields

2009-10-12 Thread Angel, Eric
value for the field "option". -Original Message- From: Jake Mannix [mailto:jake.man...@gmail.com] Sent: Monday, October 12, 2009 1:25 PM To: java-user@lucene.apache.org Subject: Re: querying multi-value fields Or else just make sure that you use PhraseQuery to hit this field when

Re: querying multi-value fields

2009-10-12 Thread Erick Erickson
problem because I think Lucene sees all these values as one long > value for the field "option". > > -Original Message- > From: Jake Mannix [mailto:jake.man...@gmail.com] > Sent: Monday, October 12, 2009 1:25 PM > To: java-user@lucene.apache.org > Subject: Re: qu

RE: querying multi-value fields

2009-10-12 Thread Angel, Eric
pq.setSlop(1); pq.add(new Term("keyword", "fff")); pq.add(new Term("keyword", "fff")); TopDocs td = searcher.search(pq, 100); searcher.close(); assertEquals(1,

Re: querying multi-value fields

2009-10-15 Thread Renaud Delbru
Message- From: Jake Mannix [mailto:jake.man...@gmail.com] Sent: Monday, October 12, 2009 1:25 PM To: java-user@lucene.apache.org Subject: Re: querying multi-value fields Or else just make sure that you use PhraseQuery to hit this field when you want "value1 aaa". If you don't tokenize