That's what "positionIncrementGap" is all about. It's the offset
between the last token of one element of your list and the first token
of the next. Let's say your doc looks like:
<doc>
   <field name="text">some text</field>
   <field name="text">other stuff</field>
</doc>

I'm presuming that's what you mean by "list".

Now the positions of these tokens are
some:    0
text:       1
other: 101
stuff:   102

assuming your positionIncrementGap is 100.

How you search for _phrases_ with a slop < 100 to prevent matches across. So
"some text"~90 would match, but "text other"~90 would not.

Best,
Erick

On Mon, Jan 29, 2018 at 2:29 PM, John Davis <johndavis925...@gmail.com> wrote:
> Hi there!
>
> We have a use case where we'd like to search within a list field, however
> the search should not match across different elements in the list field --
> all terms should match a single element in the list.
>
> For eg if the field is a list of comments on a product, search should be
> able to find a comment that matches all the terms.
>
> Short of creating separate documents for each element in the list, is there
> any other efficient way of accomplishing this?
>
> Thanks
> John

Reply via email to