Opened 4 years ago

Closed 4 years ago

#181 closed defect (fixed)

SPIRES author search conversion and multiple search terms

Reported by: tbrooks Owned by: jblayloc
Priority: critical Milestone:
Component: WebSearch Version:
Keywords: INSPIRE Syntax Oct Cc:

Description

Failure to parse date clause correctly in search pattern parenthesised.

inspire RT:85059

Tickled by the following search:
</search?ln=en&p=find+a+goto%2C+t+and+a+yamaguchi%2C+m+and+date+after+1989&f=&action_search=Search&sf=&so=d&rm=&rg=25&sc=0&of=hb>

However any search of the form "find a goto, t and a brooks, t and t neutrino" (i.e. two authors and a third search) fails

Note also, more worryingly:

http://inspirebeta.net/search?ln=en&p=find+a+goto%2C+t+and+a+brooks%2C+t&f=&action_search=Search&sf=&so=d&rm=&rg=25&sc=0&of=hb&verbose=9

does not return correct results.

find a goto, t and a brooks, t

is the same as

find a goto, t

Which is clearly worrisome!

I believe most of this will be cleared up when 131 is integrated, but it should be checked...

Note for example that

find a goto, t and a brooks, t

becomes:

Search stage 1: search_pattern_parenthesised() returned ['+', 'author:"goto, t*"', '+', '+', 'author:"brooks, t*"'].

And adding other clauses gives exceptions are generated like the following:

p = '(author:"goto, t*") and (author:"yamaguchi, m*") and year:1989->9999'

spires_syntax_converter = <invenio.search_engine_query_parser.SpiresToInvenioSyntaxConverter instance at 0x2aaab3500d88>

ap = 1

parsing_result = ['+', 'author:"goto, t*"', '+', '+', 'author:"yamaguchi, m*"', '+', '+ year:1989->9999']

Change History (11)

comment:1 Changed 4 years ago by tbrooks

Note this is essentially the same as Trac #67, though slightly different. I would merge the tickets in Trac, but I don't know how...

comment:2 Changed 4 years ago by jblayloc

  • Keywords Syntax added

comment:3 Changed 4 years ago by jblayloc

  • Owner set to jblayloc
  • Status changed from new to assigned

comment:4 Changed 4 years ago by jblayloc

  • Owner jblayloc deleted
  • Status changed from assigned to new

comment:5 Changed 4 years ago by jblayloc

  • Owner set to jblayloc
  • Status changed from new to assigned

This is indeed fixed by #131. After that is merged, this can be confirmed as fixed.

comment:6 Changed 4 years ago by jblayloc

  • Status changed from assigned to in_work

comment:7 Changed 4 years ago by jblayloc

  • Status changed from in_work to in_merge

Changing to 'in_merge'; this is fixed by #131.

comment:8 Changed 4 years ago by jblayloc

  • Status changed from in_merge to assigned

comment:9 Changed 4 years ago by jblayloc

  • Status changed from assigned to in_merge

comment:10 Changed 4 years ago by tbrooks

  • Keywords Oct added

comment:11 Changed 4 years ago by Joe Blaylock <jrbl@…>

  • Resolution set to fixed
  • Status changed from in_merge to closed

In [1fc28f35b2ce969037e54905ec08bcc7697fe914]:

WebSearch: SearchQueryParenthesisedParser rewrite

  • New SQPP supports parenthetic subexpressions nested to arbitrary depth.
  • Unit tests corrected to reflect both the new support for parentheses and because some of them should not have been correct with the old parser, either. (fixes #131) (fixes #67) (fixes #181) (fixes #189) (fixes #190) (fixes #191)
  • Introduction of logicutils unit tests.
Note: See TracTickets for help on using tickets.