Skip to content

[Search] New Component and Contracts #116

@JoshuaEstes

Description

@JoshuaEstes

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions