Using Elastic Search 8.11 and ELSER model to perform semantic search on multiple fields. I have not included any lexical search match in combination as using only embeddings field with text expansion is giving good results but its not handling misspelled queries well.
Using search query as follows:
GET search-exp/_search?filter_path=took,hits.hits._id,hits.hits._score,hits.hits._source,hits.total
{
"query": {
"bool": {
"should": [
{
"text_expansion": {
"metadata_attributes_embedding": {
"model_text": <search-query>,
"model_id": ".elser_model_2_linux-x86_64"
}
}
},
{
"text_expansion": {
"description_embedding": {
"model_text":<search-query>,
"model_id": ".elser_model_2_linux-x86_64"
}
}
},
{
"text_expansion": {
"notes_embedding": {
"model_text": <search-query>,
"model_id": ".elser_model_2_linux-x86_64"
}
}
}
],
"minimum_should_match": 1
}
},
"min_score": 0,
"from": 0,
"size": 20
}
I tried adding linear combination with fields from which embedding is generated and include it with fuzziness: "AUTO" but its hampering with good search results I am getting with only text expansion queries.
Any recommendations for this?
Thanks in advance.