Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Elasticsearch mapping and settings refactor #263

Merged
merged 7 commits into from
Sep 19, 2018
Merged

Conversation

froi
Copy link
Contributor

@froi froi commented Sep 19, 2018

Summary

Mappings and settings for Elasticsearch were not completely compatible with Elasticsearch version 5 and above. These were updated and field types were changed to correctly index documents.

Explain the motivation for making this change. What existing problem does the pull request solve?

There were a couple of errors that would show up with very specific searches. These errors would affect the way we were displaying search results on the front-end.

Test plan (required)

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Froilan Irizarry added 7 commits September 18, 2018 11:53
- Removed versions 1.0.0, 1.0.1, and 2.0.0
- Renamed mapping_201.json to mapping. From now on we will have just one mapping file
- Renamed mapping_201.json in test_data to mapping.json. This file might be removed as well at some point
- Elasticsearch mappings were updated to be 100% compatible with new features in Elasticsearch 5.x and newer
- Text fields were removed from the fields properties following best practices.
- String fields were changed to text and keyword types where appropriate. This was done because the string type has been removed.
- keyword_ci analyzer was removed since it is no longer needed. All fields that used this analyzer were changed to the keyword type.
- the field _fulltext was removed in favor of the keyword field. Now fields that need full text search are of text type from the start with keyword fields where appropriate.
- Changed the filter construction code to take into account the new changes to the mappings.
- Search and filter properties do not use string as a type. These are constructed using keyword and text types
@froi froi merged commit bf42a04 into master Sep 19, 2018
@froi froi deleted the es-mapping-refactor branch September 19, 2018 01:52
seanstar12 pushed a commit to seanstar12/code-gov-api that referenced this pull request Aug 27, 2019
Elasticsearch mapping  and settings refactor
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant