aadl / arborelastic

Custom Elasticsearch module for Drupal 8
1 stars 0 forks source link

Improve short stop word phrases #36

Closed mswinehart closed 7 months ago

mswinehart commented 8 months ago

I know we're trying to keep updates to search to a minimum, but the helpdesk this morning definitely revealed that short 3-4 word phrases beginning with stop words are prompting exceptionally poor results at the moment and should be fixed. This small update doesn't change much other than that.

It changes the query_string on the exact match boost to a phrase_prefix match, which scores better within a function_score query and so lifts up close matches better.

In the future, a stop word analyzer might be useful for titles. But could use some thought & discussion.

Here are some examples of the improvement:

Before: The Inside Game After: The Inside Game

Before: The roman empire After: The roman empire

Before: The memory index After: The memory index

taleon commented 8 months ago

I think this is a good change. From more testing it mostly doesn't change up results, but it does slightly shift them up enough on some searches that we should tell the SG Leads.

Can you email them, cc me, and outline this change? It is minor, but I'd like them to see it and have a chance to look before we roll it out.

Thanks, Matt.