-
-
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::Index::Lexicon - Iterator for a field's terms.
SYNOPSIS
my $lexicon = $index_reader->lexicon( field => 'content' ); while ( $lexicon->next ) { print $lexicon->get_term . "\n"; }
DESCRIPTION
A Lexicon is an iterator which provides access to all the unique terms for a given field in sorted order.
If an index consists of two documents with a 'content' field holding "three blind mice" and "three musketeers" respectively, then iterating through the 'content' field's lexicon would produce this list:
blind mice musketeers three
ABSTRACT METHODS
seek(target)
Seek the Lexicon to the first iterator state which is greater than or equal to
target
. Iftarget
is undef, reset the iterator.next()
Proceed to the next term.
Returns: true until the iterator is exhausted, then false.
get_term()
Return the current term, or undef if the iterator is not in a valid state.
reset()
Reset the iterator. next() must be called to proceed to the first element.
INHERITANCE
KinoSearch::Index::Lexicon 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.