Elasticsearch Query Expansion problem, multi-field search

Hi guys. I'm trying to expand some queries via Blind Relevance Feedback for an Information Retrieval project using TREC evaluation system, (CORD-19 database)

I would like to use prefixes of the best terms instead of whole words. For example, the original query is

{'query': {'multi_match': {'fields': ['title', 'abstract'],
      'query': 'coronavirus origin'}}}

and I would like to improve the score of those documents which have, for instance, prefixes like “vacc” or “labor” in the fields title and abstract.
I have tried many solutions, but the score results of the documents are always the same, like there arent change in the query!
My last implementation was

    {'query': {'bool': {'should': [{'bool': {'should': {'multi_match': {'fields': ['title',
                                                                               'abstract'],
                                                                    'query': 'coronavirus '
                                                                             'origin'}}}},
                               {'bool': {'should': {'prefix': {'abstract': 'vacc'}}}},
                               {'bool': {'should': {'prefix': {'title': 'vacc'}}}},
                               {'bool': {'should': {'prefix': {'abstract': 'labor'}}}},
                               {'bool': {'should': {'prefix': {'title': 'labor'}}}}]}}}

I don’ want all the prefixes to appear in every document, but those which have at least one prefix should improve their score.
Do you know how to do it?

Thanks,
Christian Soraruf and Federico Bottarelli

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.