Skip to content

Conversation

@amercader
Copy link
Member

  • The search action only works against a provided entity_type, not across all entities
  • Pass separate entity schemas to providers during initialization (ES and Solr still combine them in one single index/core but that can be split in the future)
  • New ISearchEntity interface, used to encapsulate all search logic of a particular entity like dataset, org, custom, etc: schema, search query schema, transforming search data, getting ids...
  • Added core plugins for datasets and organizations

Rather than combining all fields from different entities into one big
schema, pass the separate schemas namespaced by entity type to providers
so they can decide how to handle them.

For now the Solr and ES providers haven't been modified (i.e. they still
use a single core / index for all entities) but we probably want to
change that in the future (although it may make cross-entity queries
difficult).

To register a new entity to get index plugins can use the
`register_search_schema()` function which will be present in the
toolkit.
This will allow providers to target the right core/index, and CKAN to
use different search query schemas for different entities.
The ISearchEntity encapsulates all logic related to the indexing and
querying of a particular entity type, either core ones like datasets or
orgs or custom ones defined by the user.

It contains methods to return the search schema to use for this entity
(i.e. indexed fields) and a search query schema to add additional query
params that are entity-specific.

In addition contains methods to retrieve the entities to index, and a
list of all the entity ids.

This includes a first draft of the ISearchEntity plugin for datasets,
still not hooked to the rest of the logic.
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.

2 participants