Hi,

I am running Solr 5.0.0 and have a question about proximity search and
multiValued fields.

I am indexing xml files of the following form with foundField being a field
defined as multiValued and text_en my in schema.xml.

<?xml version="1.0" encoding="UTF-8"?>
<add><doc>
<field name="id">8</field>
<field name="foundField">"Oranges from South California - ordered"</field>
<field name="foundField">"Green Apples - available"</field>
<field name="foundField">"Black Report Books - ordered"</field>
</doc></add>

There are several such documents, and for instance, I would like to query
all documents having in the foundField "Oranges" and "ordered". The
following proximity query takes care of it:

q=foundField:("oranges AND ordered"~2)

However, a field could have more words, and I also cannot know the
proximity of the desired query words in advance. Setting the proximity
value too high results in false positives, the following query also returns
the document (although "available" was in the entry about Apples):

foundField:("oranges AND available"~200)

I do not think that tweaking a proximity value is the correct approach.

How can I search to match contents in a multiValued field per Value as
described above, without running into the problem?

Many thanks for any help

Reply via email to