Parentheses in search don't work with alternate search terms
|Reported by:||tbrooks||Owned by:||tbrooks|
|Keywords:||INSPIRE Syntax Oct||Cc:|
Consider the search
author:"dixon, lance j" or (author:"dixon, la j" and year:0->2011)
which is, admittedly a contrived example. Note that it must be equivalent to
author:"dixon, lance j" or author:"dixon, la j"
given that we have no papers with years outside that range.
Yet, on inspirebeta, the first gives 255, while the second 121.
This is because author:"dixon, la j" triggers the:
No exact match found for dixon, la j, using dixon la j instead...
search modification inline when it gets no results. This is just wrong, and is very dangerous with SPIRES-style author searches.
Similar annoyance is caused by the nearest terms box, though that doesn't generally change the search result. (e.g.:
Where there is a bunch of noise (again exacerbated with SPIRES-style author expansion) that might be helpful, but might just be confusing.
I'm submitting a trivial patch that fixes this by setting ap=0 and nearest_terms_box=False when search_pattern_parenthesized calls search_pattern on the subclauses.
Note that this means that we no longer give any "help" to users if a part _or all_ of their parenthesized query gives no results. This seems reasonable to me, but this will extend to authors in the SPIRES syntax, which might be less reasonable.
A better long term solution might be to refactor all of this so that, at the end of the search, one can check on whether 0 results were found, and give suggestions then, rather than changing/suggesting things in the middle of a compound search, with a possible enhancement to let people know, in a subtler way, if one of their subclauses failed to return results.
Change History (12)
comment:1 Changed 4 years ago by tbrooks
- Status changed from new to in_merge