]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Fixed seaching for a colon (:) surrounded by white space
authorLiam Whalen <lwhalen@evergreen-dev.catalogue.nrcan.gc.ca>
Thu, 11 Aug 2011 18:36:19 +0000 (14:36 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 23 Aug 2011 18:23:35 +0000 (14:23 -0400)
commit22813f800eaaea6037507f36eaff8bd55127a2eb
tree3a3e1b99e37dde492fabe3cb4f16f2566213062f
parent42a818eff95d3f9eef9015d66f7e1d5936c74118
Fixed seaching for a colon (:) surrounded by white space

When searching for a colon surrounded by white space the search would
freeze.  An example of such a search would be:
Climate change economics and policy : an RFF anthology
This was happening because the decompose function within QueryParser.pm
Would build a regular expression that would search the query for both
classes and class aliases e.g (keyword and kw).  However, when buliding
the regex for aliases QueryParser would add extraneous or symbols (|)
to the end of the regex without adding the accompanying alias.
This was happening because there was a check to see if the corresponding
class to each alias had already been added to the regex.  But, the
check to see if the alias had already been appened to the regex happened
too late.  I have moved the check to encopase the appending of the or
symbols and the class.
Signed-off-by: Liam Whalen <lwhalen@evergreen-dev.catalogue.nrcan.gc.ca>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/QueryParser.pm