Swirrl / ook

Structural search engine
https://search-prototype.gss-data.org.uk/
Eclipse Public License 1.0
6 stars 0 forks source link

WIP Filter by Codelist #37

Closed Robsteranium closed 3 years ago

Robsteranium commented 3 years ago

Branch to implement #36 (on the way to #22).

Robsteranium commented 3 years ago

Hopefully c58e6e7 should provide for most of the database access we'll need for this issue. This will need tying up with handlers and the frontend of course.

Some questions that came up while implementing it...

Perhaps facets be identified by a URI (or at least a keyword) instead of string name? The config could be a hashmap instead of a vector:

{ :ook.search/facets { :date { :name "Date", :parent-dimension "sdmxd:refPeriod" } } }

The signature of methods in db/SearchBackend and their implementation is kinda reversed? Maybe we want to refactor it? It's also a bit confusing that we have both db and opts.

We ought to load codelist names. Either in a new index or denormalised onto another document - possibly with the components to reduce duplications (as would be pretty big for codes).

We might need to extend the fixtures (or wait for interval codelists) so that the get-datasets-for-facets test properly exercises the code - at the moment it returns both of the fixture datasets which may as well involve no filtering at all!