Esri / geoportal-server-catalog

Esri Geoportal Server is a next generation open-source metadata catalog and editor, based on elasticsearch.
https://www.esri.com/en-us/arcgis/products/geoportal-server/overview
Apache License 2.0
100 stars 62 forks source link

Search for URL produces 'An error occurred' #29

Closed valentinedwv closed 5 years ago

valentinedwv commented 8 years ago

https://wateroffice.ec.gc.ca/

image

umacgillivray commented 8 years ago

Elasticsearch is throwing an exception while parsing the query string. We aren't escaping special characters prior to submitting. We submit a "query_string", maybe we should switch to a "simple_query_string" to avoid issues like this. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html

umacgillivray commented 8 years ago

Installed https://github.com/Esri/geoportal-server-catalog/commit/39c63564394797b539103961612369adac0d0630

For the search text box, switched from query_string to simple_query_string.

This can be changed on the fly from the dev console: AppContext.appConfig.search.useSimpleQueryString = false

The default can be changed within: app/context/app-config.js

At some point we should provide this toggle within the UI.