Skip to content

ElasticSearch attribute #6158

Open
Open

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 #5639 (comment)

Related: #4998, #4883

CC: @A360JMaxxgamer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions