Question

A Solr query problem here.

For example, a group checking query: There’s a string spitted by commas field in Solr, such as “Group1, Group2, Group3”. I have parameter which is a list of string, such as “Group3”, “Group4”, “Group5”. In this case the document with “Group1, Group2, Group3” need to be retrieved, because “Group3” is contains in the field.

It’s like SQL “IN”, but I don’t find a way to query such conditions. The problem is Solr doesn’t allow wildcard as first query.

Any solution for this problem? Thanks a lot!

Was it helpful?

Solution

Did you make sure the type of the column you are using in your schema is:

<fieldType name="text_country" class="solr.TextField" positionIncrementGap="100">

and not:

<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/>

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top