OpenILS::QueryParser - basic QueryParser class
use OpenILS::QueryParser; my $QParser = OpenILS::QueryParser->new(%args);
Main entrypoint into the QueryParser functionality.
$count = $QParser->facet_class_count();
$count = $QParser->search_class_count();
$count = $QParser->filter_count();
$count = $QParser->modifier_count();
$data = $QParser->custom_data($class);
$operators = $QParser->operators();
Returns hashref of the configured operators.
$filters = $QParser->filters();
Returns arrayref of the configured filters.
$filter_callbacks = $QParser->filter_callbacks();
Returns hashref of the configured filter callbacks.
$modifiers = $QParser->modifiers();
Returns arrayref of the configured modifiers.
$QParser = OpenILS::QueryParser->new(%args);
Creates a new QueryParser object.
$query_plan = $QParser->new_plan();
Create a new query plan.
$QParser->add_search_filter($filter, [$callback]);
Adds a filter with the specified name and an optional callback to the QueryParser configuration.
$QParser->add_search_modifier($modifier);
Adds a modifier with the specified name to the QueryParser configuration.
$QParser->add_facet_class($facet_class);
Adds a facet class with the specified name to the QueryParser configuration.
$QParser->add_search_class($class);
Adds a search class with the specified name to the QueryParser configuration.
$op = $QParser->operator($operator, [$newvalue]);
Retrieves or sets value for the specified operator. Valid operators and their defaults are as follows:
$classes = $QParser->facet_classes([\@newclasses]);
Returns arrayref of all configured facet classes after optionally replacing configuration.
$classes = $QParser->search_classes([\@newclasses]);
Returns arrayref of all configured search classes after optionally replacing the previous configuration.
$function = $QParser->add_query_normalizer($class, $field, $func, [\@params]);
$normalizers = $QParser->query_normalizers($class, $field);
Returns a list of normalizers associated with the specified search class and field
$normalizer = $QParser->add_filter_normalizer($filter, $func, [\@params]);
Adds a normalizer function to the specified filter.
$normalizers = $QParser->filter_normalizers($filter);
Return arrayref of normalizer functions associated with the specified filter.
$default_class = $QParser->default_search_class([$class]);
Set or return the default search class.
$QParser->remove_facet_class($class);
Remove the specified facet class from the configuration.
$QParser->remove_search_class($class);
Remove the specified search class from the configuration.
$QParser->add_facet_field($class, $field);
Adds the specified field (and facet class if it doesn't already exist) to the configuration.
$fields = $QParser->facet_fields($class);
Returns arrayref with list of fields for specified facet class.
$QParser->add_search_field($class, $field);
Adds the specified field (and facet class if it doesn't already exist) to the configuration.
$fields = $QParser->search_fields();
Returns arrayref with list of configured search fields.
$QParser->add_search_class_alias($class, $alias);
$aliases = $QParser->search_class_aliases($class);
$QParser->add_search_field_alias($class, $field, $alias);
$aliases = $QParser->search_field_aliases();
$QParser->remove_facet_field($class, $field);
$QParser->remove_search_field($class, $field);
$QParser->remove_search_field_alias($class, $field, $alias);
$QParser->remove_search_class_alias($class, $alias);
$debug = $QParser->debug([$debug]);
Return or set whether debugging output is enabled.
$query = $QParser->query([$query]);
Return or set the query.
$parse_tree = $QParser->parse_tree([$parse_tree]);
Return or set the parse tree associated with the QueryParser.
$QParser->parse([$query]);
Parse the specified query, or the query already associated with the QueryParser object.
($struct, $remainder) = $QParser->decompose($querystring, [$current_class], [$recursing], [$phrase_helper]);
This routine does the heavy work of parsing the query string recursively. Returns the top level query plan, or the query plan from a lower level plus the portion of the query string that needs to be processed at a higher level.
$index = $QParser->find_class_index($class, $query);
$limit = $QParser->core_limit([$limit]);
Return and/or set the core_limit.
$superpage = $QParser->superpage([$superpage]);
Return and/or set the superpage.
$size = $QParser->superpage_size([$size]);
Return and/or set the superpage size.