ChilliCream / ChilliCream/graphql-platform
`ElasticSearch` attribute
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 5.8k
- Forks
- 810
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 98
Description
Product
Hot Chocolate
Is your feature request related to a problem?
The current implementation of the ElasticSearch attribute and ConfigureElastic method in our codebase is not sufficiently flexible to handle various use cases. It does not allow for the configuration of multiple parameters like "Field", "Boost", and "Keyword" in a unified and structured way.
Currently, we would have separate attributes and methods for different configurations. This approach is a bit cluttered. Given [ElasticSearchFieldName] [ElasticSearchBoost] etc.
For instance, we have the ElasticSearch attribute for defining the "Field" and potentially "Boost" and we have the ConfigureElastic method for code-first configuration. The lack of alignment between these two configuration methods might lead to confusion and misuse.
The solution you'd like
A unified attribute structure for ElasticSearch would make more sense, allowing us to define all the necessary configurations in one place.
For example:
[ElasticSearch(Field = "foo", Boost = 12, Keyword = ...)]
This approach would not only make our code cleaner but also enhance its usability by providing a consistent way of defining configurations.
The new ElasticSearch attribute should accept parameters for "Field", "Boost", and "Keyword". The attribute should be designed in a way that it uses the ConfigureElastic method and handles the underlying configurations appropriately.
See https://github.com/ChilliCream/graphql-platform/pull/5639#discussion_r1186913714
Related: https://github.com/ChilliCream/graphql-platform/pull/4998, https://github.com/ChilliCream/graphql-platform/discussions/4883
CC: @A360JMaxxgamer
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing ElasticSearch attribute and ConfigureElastic method, then read the linked discussion in PR #5639 and the related PRs and discussion for prior design context. The work is done when one attribute supports Field, Boost, and Keyword while using ConfigureElastic consistently and the relevant existing configurations remain covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, elasticsearch
- Domain
- backend-api-design, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100