NAME
Data::SearchEngine::Query - Query to pass to an engine.
SYNOPSIS
The query object has some common attributes one would expect when performing a search. It has the added benefit of producing a digest that can be used with Data::SearchEngine::Results ability to serialize to implement caching.
If you add new attributes to a subclass, be sure and add the Digestable trait to any attributes you want to be included in the digest as document in Data::SearchEngine::Meta::Attribute::Trait::Digestable.
ATTRIBUTES
count
The number of results this query should return.
filters
A HashRef of filters used with the query. The key should be the filter name and the value is the filter's value. Consult the documentation for your backend to see how this is used.
order
The order in which the results should be sorted.
page
Which page of results to show.
query
The query string to search for.
METHODS
digest
Returns a unique digest identifying this Query. Useful as a key when caching.
filter_names
Return an array of filter names that are present in this query.
get_filter
Gets the value for the specified filter.
has_filters
Predicate that returns true if this query has filters.
set_filter
Sets the value for the specified filter.
AUTHOR
Cory G Watson, <gphat at cpan.org>
COPYRIGHT & LICENSE
Copyright 2009 Cory G Watson
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.