-
-
29 Jun 2009 22:37:41 UTC
- Development release
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (27 / 1 / 6)
- Kwalitee
Bus factor: 0- License: perl_5
- Activity
24 month- Tools
- Download (609.56KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Marvin Humphrey <marvin at rectangular dot com>
- Dependencies
- JSON::XS
- Lingua::Stem::Snowball
- Lingua::StopWords
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
KinoSearch::Search::SortSpec - Specify a custom sort order for search results.
SYNOPSIS
my $sort_spec = KinoSearch::Search::SortSpec->new( rules => [ KinoSearch::Search::SortRule->new( field => 'date' ), KinoSearch::Search::SortRule->new( type => 'doc_id' ), ], ); my $hits = $searcher->hits( query => $query, sort_spec => $sort_spec, );
DESCRIPTION
By default, searches return results in order of relevance; SortSpec allows you to indicate an alternate order via an array of SortRules.
Fields you wish to sort against must be
sortable
.For a stable sort (important when paging through results), add a sort-by-doc rule as the last SortRule.
CONSTRUCTORS
new( [labeled params] )
my $sort_spec = KinoSearch::Search::SortSpec->new( rules => \@rules );
rules - An array of SortRules.
INHERITANCE
KinoSearch::Search::SortSpec isa KinoSearch::Obj.
COPYRIGHT
Copyright 2005-2009 Marvin Humphrey
LICENSE, DISCLAIMER, BUGS, etc.
See KinoSearch version 0.30.
Module Install Instructions
To install KSx::Simple, copy and paste the appropriate command in to your terminal.
cpanm KSx::Simple
perl -MCPAN -e shell install KSx::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.