denshoproject / ddr-local

Web UI used for interacting with DDR collections and entities on a local machine.
Other
3 stars 0 forks source link

NRIDs are written to search_hidden without slashes because densho-elastictools search sanitizer #324

Open gjost opened 1 year ago

gjost commented 1 year ago

elastictools.search.sanitize_input removes forward-slashes along with other potentially problematic characters. This may or may not be necessary -- elasticsearch-dsl may do some sanitizing, Django may sanitize, and Elasticsearch itself may sanitize.

Whatever the case, nr_id are written to the search_hidden field (used to make things like creators and persons available to fulltext searches) without forward-slashes.

Applications that need to search nr_id e.g. ddr-local and ddr-public must be aware of this.

Are we okay with this?