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

New SearchAlgorithm class #2846

Closed
felipeelia opened this issue Jun 20, 2022 · 0 comments · Fixed by #2880
Closed

New SearchAlgorithm class #2846

felipeelia opened this issue Jun 20, 2022 · 0 comments · Fixed by #2880
Assignees
Labels
enhancement module:posts Issues related to the Posts Indexable / Feature.
Milestone

Comments

@felipeelia
Copy link
Member

Is your enhancement related to a problem? Please describe.

The solution outlined below is the first step toward #2086.

Right now we have at least 3 different search algorithms. In post searches (here) it can be selected using the ep_search_algorithm_version filter but for Users and other indexable (here) it is not easily changeable.

Creating a class with the following attributes/methods would make it easier to add new algorithms and allow the user to select them (also developers would simply create a new class and use a filter to set EP to use it.)

  • Name
  • Description
  • Search Algorithm (receiving a search term and an array of fields and returning the array to be used in the ES query)

In this first moment, we do not need any additional UI or changes in the current behavior. It is supposed to be just the build of an underlying layer for future iterations.

@felipeelia felipeelia added enhancement needs discussion module:posts Issues related to the Posts Indexable / Feature. labels Jun 20, 2022
@felipeelia felipeelia added this to the 4.3.0 milestone Jun 20, 2022
@felipeelia felipeelia self-assigned this Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement module:posts Issues related to the Posts Indexable / Feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant