Search on words spanning across different fields using edismax query parser
with minimum match(mm) and sow=false generates different queries when a
field undergoes different query-time analyses(like multi-word synonyms, stop
words, etc)

Assuming I have 2 documents where brand, description_synonyms and tags have
different data
{id: 1
  brand: amul,
  description_synonyms: slice,
  tags: cheese
}
{id:2,
  brand: amul,
  description_synonyms:cake,
  tags: cheese
}


Below is a parsed query strings for the query "amul cheese slice". In this
case, *mm(~2) is across fields* since none of amul, cheese, slice have
synonyms

"parsedquery_toString": "+((((brand:amul)^10.0 |
(description_synonyms:amul)^4.0 | tags:amul)~1.0 ((brand:cheese)^10.0 |
(description_synonyms:cheese)^4.0 | tags:cheese)~1.0 ((brand:slice)^10.0 |
(description_synonyms:slice)^4.0 | tags:slice)~1.0)*~2*)"

while below is a parsed string for "amul cheese cake". Since cake has plum
cake etc as synonyms, edismax produced below query with *mm(~2) on per
field* resulting in no match.

"parsedquery_toString": "+(((brand:amul brand:cheese brand:cake)~2)^10.0 |
((description_synonyms:amul description_synonyms:cheese
(description_synonyms:cupcak description_synonyms:pastri
description_synonyms:\"plum cake\" description_synonyms:cake))~2)^4.0 |
((tags:amul tags:cheese tags:cake)~2))~1.0"

I want to match on individual fields rather than clubbing all fields into a
single field. 

Is there a way we can solve this? Any help would be highly appreciated.






--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to