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

IndexPrefix setting for ElasticSearch does not work for Queries and ElasticContentPicker #16421

Closed
AndreySurkov opened this issue Jul 11, 2024 · 2 comments · Fixed by #16424
Closed
Labels
Milestone

Comments

@AndreySurkov
Copy link
Contributor

AndreySurkov commented Jul 11, 2024

Describe the bug

When IndexPrefix setting for ElasticSearch set in config, Elastic Search Query and ElasticContentPicker functionality do not work.

Orchard Core version

1.8.2

To Reproduce

Steps to reproduce the behavior:

  1. Set IndexPrefix in config to "dev"
  2. Go to ElasticSearch Indexes and create index "pages". ( phisical name of index will be dev_default_pages )
  3. Configure index and make shure that documents added to index
  4. On "ElasticSearch Indexes" page press "Query" button for "pages" index and execute match_all request.
  5. Results are empty/

Expected behavior

Documents from pages (dev_default_pages ) index should be displayed in results.

Dev details

Current implementation of OrchardCore.Search.ElasticSearch.Core assembly contains three places for direct manipulation with IElasticClient.

  • OrchardCore.Search.Elasticsearch.Core.Services.ElasticIndexManager
  • OrchardCore.Search.Elasticsearch.Core.Services.ElasticQueryService
  • OrchardCore.Search.Elasticsearch.Core.Providers.ElasticContentPickerResultProvider

All listed clasees have its own code for building final name of index that will be used in ES.

Proposal

Refactor current code to isolate all manipulation with IElasticClient in single class.

@AndreySurkov
Copy link
Contributor Author

I refactor a bit code to fix this #16422. Could someone take a look please?

@MikeAlhayek MikeAlhayek added this to the 2.x milestone Jul 11, 2024
Copy link
Contributor

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants