New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Odd parenthesis use confuses... something. #269
Comments
Originally on 2010-09-05 A simpler query is (ellis ), which breaks in Invenio syntax. This is not in the query parser; if you call Parser.parse_query('(ellis )') it produces exactly the right output. So the problem is somewhere else in the stack, probably in search_engine.py. I haven't yet checked whether the other paren related breakages that Annette noticed are in the parser or not. |
Originally on 2010-09-05 Annette's other examples also work when you call Parser.parse_query(query_string), so this is also being broken somewhere else in the stack. |
Originally on 2010-09-15 Also note from the user tests with Lance Dixon:
|
Originally on 2010-10-06 New version pushed per conversation on inspire-dev. Branch name is 296-WebSearch_SPIRES_parser_uses_ISO_dates. |
Originally on 2010-11-16 Some searches are fixed, but some are still giving problems. Notably:
cases 1 and 3 are essentially similar and I think the problem is in search_engine.py in search_pattern() somewhere. case 2 is just weird. |
Originally on 2011-03-07 Valkyrie, I'm hoping that the work you've been doing recently with parenthesized parser will negate the need for this, in which case I invite you to worksforme it and move on. This is also not very high priority, but would be a natural follow-on to finishing the SQPP plugin. |
Originally by valkyrie (@valkyriesavage) on 2011-03-22 The cases with (a hawking ) etc., were failing due to the empty string between hawking and ) being expanded as a part of the name. I added some scrubbers that will remove these unnecessary spaces and also made the author name regexp a little smarter. This is available in branch 269-parentheses_quirks on my public AFS repo at SLAC. |
Originally by valkyrie (@valkyriesavage) on 2011-03-22 I am setting this back to fail because the UI still captures the searches incorrectly; this will be resolved with ticket #453 when everything is directed through the parenthesised parser. The unit tests for these cases now pass, but the integration step will be necessary for the changes to be visible to users. |
Originally by valkyrie (@valkyriesavage) on 2011-03-23 Additional info on this: The SPIRES part parses correctly into (author:hawking) but there is a special case currently in search_engine that prevents search terms inside parentheses that do not contain spaces (this special case is for search terms like U(1) and SL(2,Z)) from going through the parenthesised parser. I will be working on sending all terms through the parenthesised parser in the future, since it correctly parses this. |
Originally by valkyrie (@valkyriesavage) on 2011-03-30 This was fixed alongside ticket #453 and is available on github as branch 269-453-495-direct_through_parend_parser. See notes on ticket #453 about elegance, etc. |
Originally by valkyrie (@valkyriesavage) on 2011-03-31 Now in AFS |
Originally by valkyrie (@valkyriesavage) on 2011-07-07 269-453-parend_parser_improvements --- see ticket #453 |
It works well for Invenio queries. In [1]: from invenio.modules.search.api import SearchEngine
In [2]: s = SearchEngine('author:dixon -(collaboration:D0) title:QCD')
In [3]: s.query
Out[3]: AndOp(AndOp(KeywordOp(Keyword('author'), Value('dixon')), NotOp(KeywordOp(Keyword('collaboration'), Value('D0')))), KeywordOp(Keyword('title'), Value('QCD')))
In [4]: s = SearchEngine('(ellis )')
In [5]: s.query
Out[5]: ValueQuery(Value('ellis')) Please re-open in Invenio-Query-Parser repo if you can reproduce the problem. |
WebSearch: fix cited range search
Originally on 2010-08-31
find (t supergravity or result ) and t quark
Note that space after 'result'. Without it, the search works. Which means it gives no results. But with that space, then it complains that there are mismatched parentheses and breaks.
This is the behavior in my #131 version of search_engine_query_parser.
But the version of seqp in master breaks just as much, and regardless of whether there's a space.
Annette noticed that (on -prod):
fin (a hawking) gives nothing
fin (a hawking or ellis) breaks too (only 3 results)
... but fin (a hawking or a ellis) looks OK
So there's something fascinatingly bizarre going on.
The text was updated successfully, but these errors were encountered: