Jack,

This is exactly what I was looking for, thanks. I found the
positionIncrementGap attribute in the schema.xml for the text_en

I was putting in "AND" because I read in the Solr documentation that "The
OR operator is the default conjunction operator."

Does it mean that words between " symbols, such as "Orange ordered" are
treated as a single term, with (implicitly) AND conjunction between them?

Where could I found more info about this?

I am currently reading
https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser

Thanks again

On Tue, Mar 3, 2015 at 3:58 PM, Jack Krupansky <jack.krupan...@gmail.com>
wrote:

> Just set the positionIncrementGap for the multivalued field to a much
> higher value, like 1000 or 5000. That's the purpose of this attribute, to
> assure that reasonable proximity matches don't match across multiple
> values.
>
> Also, leave "AND" out of the query phrases - you're just trying to match
> the product name and availability.
>
>
> -- Jack Krupansky
>
> On Tue, Mar 3, 2015 at 4:51 PM, Tom Devel <deve...@gmail.com> wrote:
>
> > 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