Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAK-9211: elastic dynamic boost #253

Closed
wants to merge 4 commits into from

Conversation

fabriziofortino
Copy link
Contributor

@fabriziofortino fabriziofortino commented Sep 24, 2020

This PR introduces dynamic boost for Elastic. Although some logic used in Lucene has been refactored and moved in FulltextDocumentMaker, the elastic version differs on the following aspects:

  • the boosting is performed at query time
  • structurally the docs are stored as nested docs
(lucene)
dynamicBoost.red=1 (boost=9)
dynamicBoost.blue=1 (boost=2)

(elastic)
dynamicBoost [
  {
    token="red"
    boost=9
  },
  {
    token="blue"
    boost=2
  }
]

The main differences are: the tokens are stored as analyzed values (instead of field names) and the boost is a value. This value is used at query time with a script score query.

The benefits of this implementation are:

@fabriziofortino fabriziofortino marked this pull request as ready for review September 25, 2020 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant