Boost Search on Taxonomy Pages
- prakashreddy.imduriParticipant2 years ago #31238
Found similar issue with this search:
“query”: {
“function_score”: {
“functions”: [{
“filter”: {
“match”: {
“product_visibility_str”: “featured”
}
},
“weight”: 11
}],
“query”: {
“bool”: {
“must”: {
“query_string”: {
“fields”: [“title^11”, “product_visibility_str^11”, “summary_t”, “figures_str”, “tables_str”, “contents_str”, “synopsis_str”, “content^0.5”],
“query”: “(Diabetic~1 Macular~1 Edema~1 drugs~1)”,
“default_operator”: “AND”
}
},There is a product with the title., but once fuzzy is turned on, this query returns no results . Can you check if anything wrong in this query?
prakashreddy.imduriParticipant2 years ago #31239Even searching for the word Diabetic isn’t returning any results, after fuzzy turned on.
wpsolrKeymaster2 years ago #31240Here are my own tests, with a similar query:
{ "from": 0, "size": 1, "track_total_hits": true, "_source": [ "title", "product_cat_str" ], "query": { "function_score": { "functions": [ { "filter": { "match": { "product_visibility_str": "featured" } }, "weight": 11 } ], "query": { "bool": { "must": { "query_string": { "fields": [ "title^1", "product_cat_str^1" ], "query": "(Kit~1 Blue~1)", "default_operator": "AND" } } } } } } }
{ "took" : 3, "timed_out" : false, "_shards" : { "total" : 1, "successful" : 1, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : { "value" : 76, "relation" : "eq" }, "max_score" : 8.629168, "hits" : [ { "_index" : "wpsolr-demo-woocommerce-100k-products", "_type" : "_doc", "_id" : "79452", "_score" : 8.629168, "_source" : { "product_cat_str" : [ "Political Figures" ], "title" : "Kit Blue Blue" } } ] } }
prakashreddy.imduriParticipant2 years ago #31241Can you tell me, why this queries are different with fuzzy search activated. why there is ~ icon in our query, may be this is breaking the results ?
“query”: “(Kit^1 Blue^1)”,
“query”: (Diabetic~1 Macular~1 Edema~1 drugs~1)”,prakashreddy.imduriParticipant2 years ago #31243why there is ~ icon in our query, also we have boost for all fields, but still that boost isnt showing in the query .
“fields”: [“title^11”, “product_visibility_str^11”, “summary_t”, “figures_str”, “tables_str”, “contents_str”, “synopsis_str”, “content^0.5”],
prakashreddy.imduriParticipant2 years ago #31245Can you try with fuzzy search for same query?
“query”: “(Kit~1 Blue~1)”,wpsolrKeymaster2 years ago #31247Yes, I edited my previous query and executed it, with same results.
prakashreddy.imduriParticipant2 years ago #31248how can I fix issue with fuzzy search then ? as its not even able to match the first 3 words that are present in beginning of the title , which works fine with fuzzy turned off.
prakashreddy.imduriParticipant2 years ago #31260Here is the query with fuzzy :
Here is the query without fuzzy :
Any idea, where its going wrong?- This reply was modified 2 years ago by prakashreddy.imduri.
- This reply was modified 2 years ago by prakashreddy.imduri.
prakashreddy.imduriParticipant2 years ago #31263Is there anything to do with this option ?
wpsolrKeymaster2 years ago #31264Fuzzy can have strange behaviours.
Here is the Elasticsearch fuzziness documentation if you’re interested.prakashreddy.imduriParticipant2 years ago #31266We found issue, after adding the boost , the query is retuning empty data. Here are the query monitor logs:
With Boost
Without Boost
We definitely need to use boost, to give more priority to title if more keywords are matching.
You must be logged in to reply to this topic.