If I read this correctly, one approach is to specify an increment gap in a multiValued field, then search for phrases with a slop less than that increment gap. i.e. incrementGap=100 in your definition, and search for "apple orange"~99
If this is gibberish, please post some examples and we'll try something else. Best Erick On Wed, Jun 1, 2011 at 4:21 AM, Kurt Sultana <kurtanat...@gmail.com> wrote: > Hi all, > > We're using Solr to search on a Shop index and a Product index. Currently a > Shop has a field `shop_keyword` which also contains the keywords of the > products assigned to it. The shop keywords are separated by a space. > Consequently, if there is a product which has a keyword "apple" and another > which has "orange", a search for shops having `Apple AND Orange` would > return the shop for these products. > > However, this is incorrect since we want that a search for shops having > `Apple AND Orange` returns shop(s) having products with both "apple" and > "orange" as keywords. > > We tried solving this problem, by making shop keywords multi-valued and > assigning the keywords of every product of the shop as a new value in shop > keywords. However as was confirmed in another post > http://markmail.org/thread/xce4qyzs5367yplo#query:+page:1+mid:76eerw5yqev2aanu+state:results, > Solr does not support "all words must match in the same value of a > multi-valued field". > > (Hope I explained myself well) > > How can we go about this? Ideally, we shouldn't change our search > infrastructure dramatically. > > Thanks! > > Krt_Malta >