Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Fix search on es7-persistence #170

Merged
merged 1 commit into from
Feb 1, 2023
Merged

Fix search on es7-persistence #170

merged 1 commit into from
Feb 1, 2023

Conversation

BirknerAlex
Copy link
Contributor

@BirknerAlex BirknerAlex commented Jan 20, 2023

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes (Please run ./gradlew generateLock saveLock to refresh dependencies)
  • WHOSUSING.md
  • Other (please describe): Updated README.md for index for better clarity .

Changes in this PR

Currently when using the es7-persistence index plugin no workflows will be returned from the search since the query to Elasticsearch isn't correct for ES7 and contains the deprecated _type field in the request URI.

See also: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html

Before the change the workflow query will be build something like:

http://127.0.0.1:9200/conductor_workflow/workflow/_search?typed_keys=true&max_concurrent_shard_requests.....

After the change, the URL looks like:

http://127.0.0.1:9200/conductor_workflow/_search?typed_keys=true&max_concurrent_shard_request.....

The Elasticsearch _search API still supports the _types but when indexing new objects the provided type can no longer be defined and will be ignored. All newly added documents do have the type _doc now and no longer workflow.

This change should be backwards compatible to existing documents when upgrading from ES6 to ES7.

I also added the plugin to the gradle.build file and fixed the corresponding lock files as well. In my case it has worked to still include the upstream es6-persistence plugin as well the es7-persistence plugin.

@DukeDai
Copy link

DukeDai commented Feb 14, 2023

Thanks, hope this can be released early as possible(I must use a local jar to workaround this)

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.

3 participants