Catman..._store(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay bestie so this is Catmandu::Fix::search_in_store β€” a little Perl manual page (a 3pm one, from the User Contributed Perl Documentation crew 🫢). What it does? It takes a value, uses it as a query, and swaps it out for a whole search object. it's giving glow-up πŸ’…


🌸 SYNTAX 🌸

search_in_store(path)

search_in_store(path,store: 'store', bag: 'bag', limit: 0, start: 0,
sort: 'title desc')

that's the whole vibe. one path, or a path plus a lil entourage of options πŸ‘‘


πŸŽ€ RETURN VALUE πŸŽ€

here's what you get back, and no cap, it's a whole struct:

{
    start: 0,
    limit: 0,
    hits: [],
    total: 1000
}

cf. Catmandu::Hits ✨


πŸ’– PARAMETERS πŸ’–

path

the spot in the perl hash where the query is chillin'. like, where your search lives πŸ“

see "PATHS" in Catmandu::Fix for all the tea on paths.

store

the name of the store. bestie, listen β€” this store MUST be an implementation of Catmandu::Searchable. non-negotiable, periodt.

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 info.

default is 'default'.

bag

name of the bag. that's it, that's the whole job πŸ‘œ

default is 'data'.

limit

only return $limit number of records. keep it cute, keep it small βœ‚οΈ

start

offset of records to return. like, skip this many first πŸƒβ€β™€οΈ

sort

sort records before slicing them. important order of operations, iykyk.

this parameter is store specific β€” so don't come for me if your store does its own thing πŸ™ˆ


🌈 OTHER PARAMETERS 🌈

other parameters are given to the contructor of the Catmandu::Store β€” yep, you can just yeet extra stuff in there and it goes straight to the constructor πŸ’Œ

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')

πŸ¦‹ EXAMPLES πŸ¦‹

#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')

look at all those lil variations, each one a main character πŸ’…πŸ”₯


πŸ‘‘ AUTHORS πŸ‘‘

Nicolas Franck <nicolas.franck at ugent.be> β€” the icon who made this happen, we stan 🫢


πŸ’œ SEE ALSO πŸ’œ

  • Catmandu::Fix
  • Catmandu::Store

lowkey a whole serve of a page, and that's on that πŸ’€

k bye bestie, this was perl v5.40.1, dated 2026-01-24, brought to you by Catman..._store(3pm) 🌟 mwah πŸ’‹

πŸ“¦ where this page comes from