NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 26 forks source link

Change all Solr query syntax to use the "AND" operator #619

Closed laurenwalker closed 4 years ago

laurenwalker commented 6 years ago

Currently, the queries in MetacatUI are constructed with using the space character (or %20 or +) as an 'AND' operator. We need to change this to using the word AND, to be compatible with Solr 7 in the future.

laurenwalker commented 6 years ago

Dave V found a Solr parameter that could solve this issue. The q.op parameter specifies a default query operator. So we could possibly add the q.op=AND parameter to each query rather than replace all our spaces with ANDs.

Examples:

https://cn.dataone.org/cn/v2/query/solr/?start=0&rows=0&fl=id%2Ctitle%2CformatId&q=title%3Atest%20page&debug=query&q.op=AND

https://cn.dataone.org/cn/v2/query/solr/?start=0&rows=0&fl=id%2Ctitle%2CformatId&q=title%3Atest%20page&debug=query&q.op=OR

taojing2002 commented 6 years ago

CN has solr 5 and we need to test it at solr 7.3. On 5/10/18 3:02 PM, Lauren Walker wrote:

Dave V found a Solr parameter that could solve this issue. The |q.op| parameter specifies a default query operator. So we could possibly add the |q.op=AND| parameter to each query rather than replace all our spaces with |AND|s.

Examples:

https://cn.dataone.org/cn/v2/query/solr/?start=0&rows=0&fl=id%2Ctitle%2CformatId&q=title%3Atest%20page&debug=query&q.op=AND

https://cn.dataone.org/cn/v2/query/solr/?start=0&rows=0&fl=id%2Ctitle%2CformatId&q=title%3Atest%20page&debug=query&q.op=OR

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NCEAS/metacatui/issues/619#issuecomment-388199716, or mute the thread https://github.com/notifications/unsubscribe-auth/AHsIDJNEftzE7F_ARG3VQNahLNtDNbcrks5txLj8gaJpZM4T6e8f.

laurenwalker commented 4 years ago

This is done already