[Koha-bugs] [Bug 12443] Initial re-factoring of buildQuery

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 2 09:14:58 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12443

--- Comment #14 from David Cook <dcook at prosentient.com.au> ---
More thoughts on  C4::Search::buildQuery and Koha::QueryParser...


C4::Search::buildQuery:

PRO: Right/left/right&&left truncation, QueryFuzzy appears to work,
QueryWeightFields works (except when QueryAutoTruncate is on), QueryStemming
works with wordlists.

CON: No support for phrases, lots of ugly spaghetti code which is mutually
exclusive, incorrectly defines variables, etc.

FUTURE:
Planning to integrate "QueryWeightFields", "QueryFuzzy", "QueryAutoTruncate",
and "QueryStemming" into _build_initial_query().
"QueryWeightFields" and "QueryFuzzy" could be improved.

"QueryStemming" is a tough one...as it really is only useful for Word
Lists...so we'll have to check the structure and make sure there are no
quotation marks sneaking in as they'll cause problems. That should work all
right.

--


Koha::QueryParser:

PRO: Automatically detects phrases, automatically detects right truncation.

"Koha::QueryParser::Driver::PQF::query_plan::node" already uses
"QueryAutoTruncate", some "QueryWeightFields"-like functionality (which needs a
more configuration and possibly some code tweaks).

CON: No left truncation, no left && right truncation, no easy way to designate
a phrase (except by wrapping in quotes or by providing an alias)

FUTURE: "Koha::QueryParser::Driver::PQF::query_plan::node" could make it easy
to add "QueryStemming" and "QueryFuzzy". We could also add support for left
truncation and left && right truncation using that same module. 

Improve relevance bumps (aka QueryWeightFields functionality) in
queryparser.yaml.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list