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

Fix: compatibility with elasticsearch 2 #916

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

ysbaddaden
Copy link
Contributor

@ysbaddaden ysbaddaden commented Nov 13, 2023

Fixes a number of deprecated features in elasticsearch 1 that got removed in elasticsearch 2:

  • Replaces multi-field type for a string with a nested field (deprecated in elasticsearch 1).
  • Avoids the . in field definitions (invalid in elasticsearch 2).
  • Removes the path definition that isn't needed (deprecated in elasticsearch 2).
  • Renames default_index as default (deprecated in elasticsearch 1).
  • Use size instead of limit filter (deprecated in elasticsearch 1).
  • Uses aggregations instead of facet searches (deprecated in elasticsearch 2).

These changes are compatible with elasticsearch v1.7 and v2.4 and the elasticsearch migration plugin returns a full green status.

To test against elasticsearch 2, you must tweak the docker compose service. For some reason the index.max_result_window setting must be increased from the default of 10000. For example:

services:
  elasticsearch:
    image: elasticsearch:2.4-alpine
    command: elasticsearch -Dindex.max_result_window=1000000

Replaces multi_field type for a string with a nested field. The feature
was already deprecated in elasticsearch 1

Avoids the `.` in the field definition that is incompatible with
elasticsearch 2.

Removes the path definition that isn't needed and deprecated in
elasticsearch 2.

These changes are compatible with elasticsearch v1.7 and v2.4 and the
elasticsearch migration plugin returns a full green status.

See https://github.com/elastic/elasticsearch-migration/tree/1.x
@ysbaddaden ysbaddaden self-assigned this Nov 13, 2023
@ysbaddaden ysbaddaden marked this pull request as ready for review November 14, 2023 08:40
@ysbaddaden
Copy link
Contributor Author

ysbaddaden commented Nov 14, 2023

Hum, it's not ready, I have a few issues after upgrading to elasticsearch 2.
No issues no more.

@ysbaddaden ysbaddaden added the tech-debt Technical Debt label Nov 14, 2023
@ysbaddaden ysbaddaden merged commit 3974045 into master Nov 16, 2023
2 checks passed
@ysbaddaden ysbaddaden deleted the task/upgrade-elasticsearch branch November 16, 2023 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant