Bug 9239: Introduce QueryParser driver for PQF
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 2 Oct 2012 21:06:47 +0000 (17:06 -0400)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 17 Mar 2013 01:32:32 +0000 (21:32 -0400)
commit2900bd14dcd02bf9ac9912c7e620c8e67d62c01c
tree2c06f9fb99b26b55b8174433f9cc45639795dc2b
parent2a202740ffb881ded4ce8341cdbb989c245eafac
Bug 9239: Introduce QueryParser driver for PQF

Since the most expressive query language supported by Zebra is PQF, this
patch adds a PQF driver for QueryParser which will translate QueryParser
queries into standard PQF (guided by mappings which have been written to
match Koha's existing Zebra configuration) which can then be sent to
Zebra. This driver, Koha::QueryParser::Driver::PQF(::*) extends the
OpenILS::QueryParser(::*) class(es), so as to preserve maximum
interoperability between the various users of the QueryParser driver.

Initially, search syntax is as follows:
* AND operator: &&
* OR operator: ||
* GROUPING operators: ( )

Fields can mostly be searched using the ccl prefixes they have now. The
exception is the various date limits which are searched with a syntax
like this: pubdate(2008)

For sorting, you can simply add #title-sort-az (etc.) to your query.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Elliott Davis <elliott@bywatersolions.com>
Test Passed successfully after installing missing dep for Test::Deep

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Koha/QueryParser/Driver/PQF.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/Util.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/query_plan.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/query_plan/facet.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/query_plan/filter.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/query_plan/modifier.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/query_plan/node.pm [new file with mode: 0644]
Koha/QueryParser/Driver/PQF/query_plan/node/atom.pm [new file with mode: 0644]
etc/searchengine/queryparser.yaml [new file with mode: 0644]
t/QueryParser.t [new file with mode: 0644]