PASTAplus / DataPortal

EDI Data Portal
3 stars 3 forks source link

Requests to vocab.lternet.edu are not fulfilled when terms are surrounded with quotes #120

Closed servilla closed 7 months ago

servilla commented 7 months ago

Requests to vocab.lternet.edu are not fulfilled when quotes surround terms. These quoted terms are encoded verbatim (with the quotes) when sent to vocab.lternet.edu and, therefore, become part of the search pattern. As such, related or more specific terms are not found due to the presence of the quotes. Surrounding quotes should be removed before being added to the REST API for vocab.lternet.edu.

Refer to the webServiceSearchValues method in edu/lternet/pasta/portal/search/ControlledVocabularyClient.java

servilla commented 7 months ago

Additional issue: multi-word terms should always be sent to Solr with double quotes (%22).

Note that multi-word terms that are not quoted will be searched on permuted lists of the words. In other words, the multi-word term carbon+dioxide will search on both carbon+dioxide and dioxide+carbon. The term "carbon+dioxide" will only search on carbon+dioxide.

servilla commented 7 months ago

Additional issue: multi-word search terms are only processed when enclosed with double quotes. Single quotes are removed from the search term prior to sending to the controlled vocabulary service. Use of double quotes should be explicitly stated in the "Tip" text.