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:22:37 +0000 (14:22 -0400)
commite7db1d05e10d965c9515a7941d517ce541362ef2
tree15eba19c112ab9cb901638f2acb0039216da85c4
parent282adfc24a0b5171cd0af91e670ed9f6af7e8f88
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/OpenILS/Application/Storage/QueryParser.pm