Hello!
I have created the following ruleset in my Elastic Cloud instance
PUT _query_rules/rule1
{
"rules": [
{
"rule_id": "rates",
"type": "pinned",
"criteria": [
{
"type": "exact",
"metadata": "query_string",
"values": ["rates"]
}
],
"actions": {
"ids": [
"6729885c0a157abc2325c2ac",
"67297a0f0a157aa01d0cb357",
"67297dd70a157a7f97138cfe"
]
}
}
]
}
According to Searching with query rules | Elasticsearch Guide [8.16] | Elastic, if the organic query matches, it should return the results with the ID's specified in the action first
{
"from": 0,
"size": 10,
"_source": [
"title",
"url",
"headings",
"id"
],
"query": {
"rule": {
"match_criteria": {
"query_string": "rates"
},
"organic": {
"query_string": {
"query": "rates"
}
},
"ruleset_ids": [
"rule1"
]
}
},
"explain": true
}
Which doesn't happen in my case.
Some other info
- The IDs definitely match the query and exist in the index
- Explain doesn't appear to show any info about the ruleset match
- I am on Elastic Cloud - v8.15.3
Any help with this would be much appreciated
Thanks