Reputation: 101
A csv file has been indexed in solr(8.9) with field as food, color and other fields.
Both food and color fields have fieldType : text_general with multivalued as false. i want to retrieve result from solr index with 'food' field as minimum match of 60% token and color field to exact match as specified in input value.
To suport the first 'food' field requirement extended dismax parameter 'mm' has been used in the solr query but how will i incorporate exact match on color field requirement in above query.
Query is
curl -G http://localhost:8983/solr/eDisMaxCore/select --data-urlencode "q=(food:'bread~' OR food:'cheese~' OR food:'paneer~' OR food:'milk~')" --data-urlencode "defType=edismax" --data-urlencode "mm=60%" --data-urlencode "sort=cuisine_id asc"
In the above query i want to incorporate color field as white.
I expect the following row to match:
food,color
bread cheese fish meat,white
In the above case 'food' field is satisfying criteria of mm to 60%match and also 'color' having value as 'white'.
I expect the following row not to match:
food,color
bread cheese fish meat,green
In the above case 'food' field is satisfying criteria of mm to 60%match but 'color' has value as 'green', so it will not be part of output.
How can i incorporate color field requirement in above query? Any help is much appreciated.
Upvotes: 1
Views: 81