| Catmandu::Fix::search_in_store(3pm) | User Contributed Perl Documentation | Catmandu::Fix::search_in_store(3pm) |
Catmandu::Fix::search_in_store - use the value as query, and replace it by a search object
search_in_store(path)
search_in_store(path,store: 'store', bag: 'bag', limit: 0, start: 0, sort: 'title desc')
{
start: 0,
limit: 0,
hits: [],
total: 1000
}
cf. Catmandu::Hits
The location in the perl hash where the query is stored.
See "PATHS" in Catmandu::Fix for more information about paths.
The name of the store.
This store MUST be an implementation of Catmandu::Searchable.
There are several ways to refer to a store:
* by full package name ( e.g. 'Catmandu::Store::Solr' )
* by short package name ( e.g. 'Solr' )
* by name defined in the Catmandu configuration
See "store-NAME" in Catmandu for more information.
Default is 'default'.
Name of bag.
Default is 'data'.
only return $limit number of records.
offset of records to return
sort records before slicing them.
This parameter is store specific.
other parameters are given to the contructor of the Catmandu::Store
e.g. catmandu.yml:
store:
catalog:
package: "Catmandu::Store::Solr"
e.g. fix:
search_in_store('foo.query', store:'catalog', bag: 'data', url: 'http://localhost:8983/solr/catalog')
#search in Catmandu->store->bag, and store first 20 results in the foo.query.hits
search_in_store('foo.query')
#search in Catmandu->store->bag, and store first 20 results in the foo.query.hits
search_in_store('foo.query', store:'default')
#search in Catmandu->store->bag; limit number of results to 10
search_in_store('foo.query', store:'default', limit: 10)
#search in Catmandu->store->bag; limit number of result to 10, starting from 15
search_in_store('foo.query', store:'default', limit: 10, start: 15)
#search in Catmandu->store->bag('persons'); sort by year descending, and by title ascending
search_in_store('foo.query', store:'default', bag:'persons', sort: 'year desc,title asc')
Nicolas Franck "<nicolas.franck at ugent.be>"
Catmandu::Fix
Catmandu::Store
| 2023-03-03 | perl v5.36.0 |