in my solr documents I use a multivalued field to store some colorIDs

(e.g. "10","130","190")

If in my query I search for colorID 30 (fq=colorID:30) I get documents which have the 30 as colorID, but additionally there are results which have only "130" as part of multivalued field. But I ONLY need to get those who exactly match to "30"

Is it possible to setup that field to get that exact results only? What FilterFactory do I have to use, Tokenizers etc...

Any help would be fine.

有帮助吗?

解决方案

Assuming you're using built-in field types in Solr, you can accomplish exact matches using the "string" data type for the field. (You could use "int" as well, but if you're doing strict lookup type of queries, string will suffice.)

Post your schema definition from schema.xml to clarify.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top