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

Ngram fields for orders autosuggest #3324

Merged
merged 5 commits into from
Feb 23, 2023
Merged

Conversation

felipeelia
Copy link
Member

@felipeelia felipeelia commented Feb 20, 2023

Description of the Change

This PR introduces the code needed so orders autosuggest start using ngram fields. As autosuggest and the orders autosuggest have some intersection between fields and mapping changes, the common code was moved to the indexable and post indexable classes.

It is done by adding a term_suggest field to all orders, filled with all fields we want to be searchable.

Closes #3281

How to test the Change

Changelog Entry

Add this to the orders autosuggest PRs list

Credits

Props @felipeelia

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@felipeelia felipeelia added this to the 4.5.0 milestone Feb 20, 2023
@felipeelia felipeelia changed the title ngram fields for orders autosuggest + refactor Ngram fields for orders autosuggest Feb 20, 2023
includes/classes/Feature/WooCommerce/Orders.php Outdated Show resolved Hide resolved
includes/classes/Feature/WooCommerce/Orders.php Outdated Show resolved Hide resolved
@anjulahettige
Copy link
Collaborator

For now, we are just searching on the fields that are being displayed.

@felipeelia felipeelia merged commit 27dbbc5 into develop Feb 23, 2023
@felipeelia felipeelia deleted the feature/orders-ngrams branch February 23, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement partial word search and highlighting for orders autosuggest
3 participants