DataONEorg / rdataone

R package for reading and writing data at DataONE data repositories
http://doi.org/10.5063/F1M61H5X
36 stars 19 forks source link

Check if solr 6 removal of 'defaultOperator' affects rdataone #213

Open gothub opened 6 years ago

gothub commented 6 years ago

The 'defaultOperator' configuration parameter (in schema.xml) was deprecated in Solr 5 and removed in Solr 6 . This can affect queries where the operator (either 'and' or 'or') is not specified between query terms, as the default would be assumed in these cases, i.e. the query

https://cn.dataone.org/cn/v2/query/solr/?start=0&rows=0&fl=id,title,formatId&q=title:test page

could be interpreted as "title=test AND page" or "title=test OR page" depending on the default operator.

This is significant, because the default for metacat is set to 'AND' which will no longer be the case when Solr 7.x is implemented, i.e.:

https://github.com/NCEAS/metacat/blob/master/metacat-common/src/main/resources/solr-home/conf/schema.xml#L427

Check the 'query()' routine to see if &q.op=AND needs to be added to queries that are constructed by this method.