Match solr documents with exact one value in an multi valued field

Viewed 168

I have an solr index with an multivalued field named colors, where all the colors stored, related to the document, like:

colors: ["blue","red"]
colors: ["blue" "brown", "green"]
colors: ["blue"]

Now I need to get only those documents, which has only one color or which only has "blue". So the solr query should return only on document, which has only one value in this multi-value filed:

colors: ["blue"]

Is there a way to do this with solr-syntax?

Thank you.

0 Answers
Related