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 just apply the figure as part of any query?

Scott.

On 2/03/11 9:01 AM, Ahmet Arslan wrote:
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.
Your best bet can be using positionIncrementGap and to issue a phrase query 
(implicit AND) with the appropriate slop value.

Ff you have positionIncrementGap="100", you can simulate this with using
&q=field1:"termA termB"~100

http://search-lucene.com/m/Hbdvz1og7D71/





Reply via email to