Thanks, but just to confirm the way multiValued fields work:
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
returned even though both terms don't occur within a single value in the
multiValued field.
What I'm wondering is if there is a way of applying the query against
each value of the field rather than against the field in its entirety.
The reason being is the number of values I want to store is variable and
I'd like to avoid the use of dynamic fields or restructuring the index
if possible.
Scott.
On 2/03/11 12:35 AM, Steven A Rowe wrote:
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
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 different views mean a lot of work to revamp
pagination etc).
So, is there a way to apply a query to each value of a multivalued field
or is it always treated as a "single" field from a query perspective?
Thanks.
Scott.