Users often like to search by sample or specimen number that might contain minus sign (160-7). Such search will return many rows (http://geocollections.info/search/160-7/specimen/1/100) and often the most important ones are not the first in the list.
If the search string contains "-" and does not contain " ", we can safely assume that the minus sign is not search operator, but part of the string to be searched for.
In these cases, the string should be quoted before sending to solr as "160-7" instead of 160-7. Then it would return reasonable number of results (http://geocollections.info/search/%22160-7%22/specimen/1/100).
Users often like to search by sample or specimen number that might contain minus sign (160-7). Such search will return many rows (http://geocollections.info/search/160-7/specimen/1/100) and often the most important ones are not the first in the list. If the search string contains "-" and does not contain " ", we can safely assume that the minus sign is not search operator, but part of the string to be searched for. In these cases, the string should be quoted before sending to solr as "160-7" instead of 160-7. Then it would return reasonable number of results (http://geocollections.info/search/%22160-7%22/specimen/1/100).