Closed fenekku closed 8 months ago
@ntarocco I had the same issue in Citadel Search (rebrand of CERN Search). At the moment (8 months ago) there was no way of removing a field form the search in ES (v6.2), maybe now there is one.
The way I solved it was to replicate the behaviour of _all
field (which was deprecated in ES, maybe we should also check why). So now in my schemas I have something like:
_access: explicit permissions here
_ data: all fields with content to be searchable
Afterwards by using the ES python DSL, you can specify the field in which the query will be performed (https://github.com/elastic/elasticsearch-dsl-py/blob/master/elasticsearch_dsl/query.py#L12 through params to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html see "default_field").
However, I recall issues with booleans and dates, because they were not strings so I had to move them out of this default fields.
From my perspective the tasks would be:
_all
was deprecated_data
metioned above.
copy_to
vs having a field containing everything e.g. _data
(copy_to
this would have implications when doing queries to specific fields, which leads to the next point)
This is an extension to RFC #7 . To be verified by implementation work (https://github.com/inveniosoftware/invenio-records-permissions/issues/16).