Johannes,

I think your best bet is to create a QParserPlugin that orders the terms of
the incoming query. It sounds like you have control over the way that field
is indexed, so you could enforce the same ordering when the document comes
into Solr. If that's not the case then you'll also want to write an
UpdateRequestProcessor:

https://wiki.apache.org/solr/UpdateRequestProcessor

Using a phrase query is probably not an option since you're probably
working with > 3 terms and phrase slop wouldn't be able to extend past that.


Hope that helps!
-Scott


On Wed, Dec 16, 2015 at 8:38 AM, Johannes Riedl <
johannes.ri...@uni-tuebingen.de> wrote:

> Hello all,
>
> we are facing the following problem: we use a multivalued string field
> that contains entries of the kind A/B/C/, where A,B,C are terms.
> We are now looking for a simple way to also find all permutations of
> A/B/C, so e.g. B/A/C. As a workaround we added a new field that contains
> all entries alphabetically sorted and guarantee sorting on the user side.
> However - since this is limited in some ways - is there a simple way to
> either index in a way such that solely A/B/C and all permutations are found
> (using e.g. type=text is not an option since a term could occur in a
> different entry of the multivalued field) or trigger an alphabetical
> sorting of incoming queries.
>
> Thanks a lot for your feedback, best regards
>
> Johannes
>
>


-- 
Scott Stults | Founder & Solutions Architect | OpenSource Connections, LLC
| 434.409.2780
http://www.opensourceconnections.com

Reply via email to