I have an Elasticsearch index ingested with inference pipeline using ELSER. While performing the search I would like to filter and show all the URL's containing "/cn/" in it. (http://www.elastic.co/giude/cn/*).
How to add filter section in the below search query to filter out all the URLs containing "/cn/"?
GET search-index/_search
{
"size": 5,
"query":{
"text_expansion":{
"ml.inference.body_content_expanded.predicted_value":{
"model_id":".elser_model_1",
"model_text":"Search_query"
}
}
},
"fields": ["title","url"],
"_source": false
}