Hi Scott,
Querying against a multi-valued field just works - no special incantation
required.
Steve
-Original Message-
From: Scott Yeadon [mailto:scott.yea...@anu.edu.au]
Sent: Monday, February 28, 2011 11:50 PM
To: solr-user@lucene.apache.org
Subject: Query on multivalue field
-Original Message-
From: Scott Yeadon [mailto:scott.yea...@anu.edu.au]
Sent: Monday, February 28, 2011 11:50 PM
To:solr-user@lucene.apache.org
Subject: Query on multivalue field
Hi,
I have a variable number of text-based fields associated with each
primary record which I wanted to apply
In a multiValued field, call it field1, if I have two
values indexed to
this field, say value 1 = some text...termA...more text
and value 2 =
some text...termB...more text and do a search such as
field1:(termA termB)
(where solrQueryParser defaultOperator=AND/) I'm
getting a hit
The only trick with this is ensuring the searches return the right
results and don't go across value boundaries. If I set the gap to the
largest text size we expect (approx 5000 chars) what impact does such a
large value have (i.e. does Solr physically separate these fragments in
the index or
Each token has a position set on it. So if you index the value alpha
beta gamma, it winds up stored in Solr as (sort of, for the way we want
to look at it)
document1:
alpha:position 1
beta:position 2
gamma: postition 3
If you set the position increment gap large, then
Tested it out and seems to work well as long as I set the gap to a value
much longer than the text - 1 appear to work fine for our current
data. Thanks heaps for all the help guys!
Scott.
On 2/03/11 11:13 AM, Jonathan Rochkind wrote:
Each token has a position set on it. So if you index
Hi,
I have a variable number of text-based fields associated with each
primary record which I wanted to apply a search across. I wanted to
avoid the use of dynamic fields if possible or having to create a
different document type in the index (as the app is based around the
primary record and