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

Update Elastic mappings to support search and aggregations #44

Open
delsborg opened this issue Feb 13, 2019 · 0 comments
Open

Update Elastic mappings to support search and aggregations #44

delsborg opened this issue Feb 13, 2019 · 0 comments

Comments

@delsborg
Copy link
Member

delsborg commented Feb 13, 2019

The current mappings have most fields set to "string".
We should examine the use of keywords, text, and other analyzers for the fields.
A robust mapping should allow for use cases like:

  1. Case insensitive search
  2. Search on phrases
  3. Accurate bucketing of terms
    . "Climate Change" = "climate change" -- both phrases should be in the same bucket

This would be a structure like:

{
  "mappings": {
    "_doc": {
      "properties": {
        "my_field": { 
          "type": "text",
          "fields": {
            "keyword": { 
              "type": "keyword"
            }
          }
        }
      }
    }
  }
}```

This would allow queries on my_field or my_field.keyword
It should also allow for more accurate bucketing of terms for aggregatons/facets.

This issue supports  #26
I created it to just address the specifics of the elastic mappings

Supporting documents: https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html
and  https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-analyzers.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant