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

[Search] New Component and Contracts #116

Closed
JoshuaEstes opened this issue Nov 8, 2023 · 0 comments · May be fixed by #176
Closed

[Search] New Component and Contracts #116

JoshuaEstes opened this issue Nov 8, 2023 · 0 comments · May be fixed by #176
Milestone

Comments

@JoshuaEstes
Copy link
Member

JoshuaEstes commented Nov 8, 2023

Many apps have some type of search, this could be a basic search on a database field or using some type of backend like solr. Algolia and AWS CloudSearch could also be some solutions.

The new component would provide the ability to swap out different backends and the contracts would allow others to create implementations.

One idea would to be able to chain different search backends together, for example, multiple database backends could search many different tables and columns and provide a global search. Add in some of the other backend and this could be pretty powerful.

$search = new Search($backend);
$results = $search->query('search term');

Possible Interfaces

  • SearchInterface (Primary interface that is used)
  • QueryInterface (sent to the backend)
  • ResultInterface (returned from the backend)
  • ResultSetInterface (contains many ResultInterfaces)
  • BackendInterface (Database, Mock, Null, Algolia, etc)
  • FacetAware, HighlightAware, etc. (Different backends support different features)

Compatible with components: logger, cache, links

Can use the Pager Component for results

@JoshuaEstes JoshuaEstes added this to the v1.x milestone Nov 8, 2023
@JoshuaEstes JoshuaEstes linked a pull request Nov 30, 2023 that will close this issue
4 tasks
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 a pull request may close this issue.

1 participant