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

fields which are only used for filtering should be moved out of the query section of the mapping #645

Open
harrisonpim opened this issue Apr 5, 2023 · 1 comment
Labels
search relevance Tuning and improving ranking and relevance

Comments

@harrisonpim
Copy link
Contributor

harrisonpim commented Apr 5, 2023

We currently have four top-level objects in our mapping

  • display: the document we show in the api, not indexed
  • debug: for developers' eyes only, nothing indexed apart from indexedTime
  • query: the mashed up, heavily analysed fields which are all indexed and used to control relevance, with some keyword subfields used for filtering
  • aggregatableValues: which are used for aggregations, also indexed as keywords

There's a chance that we're indexing too many fields in the query section - devs working filters assume fields are there for relevance, and those engineering relevance assume they're there for filtering. The end result is a bloated index with unused fields, or fields serving multiple purposes which are hard to disentangle.

We could be more explicit about the separation of filtering and relevance-scoring by splitting the top level into

  • display: as above

  • debug: as above

  • query: only used for relevance scoring

  • filters: which might be structured like

    {
      "filters": {
        "fieldName": {
          "filterableValues": ___,
          "aggregatableValues": ___
        }[]
      }
    }

    in which all indexed fields should be keywords or dates

@harrisonpim harrisonpim converted this from a draft issue Apr 5, 2023
@harrisonpim harrisonpim added the search relevance Tuning and improving ranking and relevance label Apr 5, 2023
@harrisonpim harrisonpim changed the title move fields which are only used for filtering out of the query section of the mapping fields which are only used for filtering should be moved out of the query section of the mapping Apr 5, 2023
@agnesgaroux
Copy link
Contributor

Has this been completed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
search relevance Tuning and improving ranking and relevance
Projects
Status: Backlog
Development

No branches or pull requests

2 participants