2
votes

A couple of days ago I posted this: Returning documents using multi-valued field and I don't think I was clear. I'm new to Solr.

Currently I'm issuing this query on Solr: http://localhost:9001/solrfacetsearch/master_Shop/select/?q=%28keyword_text_mv%3A%28alice+AND+trudy%29%29+AND+%28catalogId%3A%22Default%22%29+AND+%28catalogVersion%3AOnline%29&start=0&rows=2147483647&facet=true&facet.field=category_string_mv&sort=preferred_boolean+desc%2Cgeo_distance+asc&facet.mincount=1&facet.limit=50&facet.sort=index&radius=111.84681460272012&long=5.2864094&qt=geo&lat=52.2119418&debugQuery=on

where as you can see I'm searching for keywords Alice AND Trudy. This query returns a document which contains:

<arr name="keyword_text_mv">
<str>alice jill</str>
<str>trudy alex</str>
</arr>

The problem is I'd like the document to be returned only if it contains a string "alice trudy" in one of its values, in other words, if it contains :

<arr name="keyword_text_mv">
<str>alice trudy</str>
<str>jill alex</str>
</arr>

Note that I'm not after "alice trudy" as a string in particular but there could be other words between alice and trudy.

How could I do this? Be gentle plz, I'm still new to the Solr world :) ... I'm supporting the code written by someone else.

Thanks in advance,

Krt_Malta

2

2 Answers

1
votes

EDIT

See this thread from the mailing list.

1
votes

Why don't you search as q=keyword_text_mv:alice trudy?