plucene::index::segmentinfos(3pm) [debian man page]
Plucene::Index::SegmentInfos(3pm) User Contributed Perl Documentation Plucene::Index::SegmentInfos(3pm)NAME
Plucene::Index::SegmentInfos - A collection of SegmentInfo objects
SYNOPSIS
my $segmentinfos = Plucene::Index::SegmentInfos->new;
$segmentinfos->read($dir);
$segmentinfos->write($dir);
$segmentinfos->add_element(Plucene::Index::SegmentInfo $segment_info);
my Plucene::Index::SegmentInfo @segment_info
= $segmentinfos->segments;
DESCRIPTION
This is a collection of Plucene::Index::SegmentInfo objects
METHODS
new
my $segmentinfos = Plucene::Index::SegmentInfos->new;
This will create a new (empty) Plucene::Index::SegmentInfos object.
read
$segmentinfos->read($dir);
This will read the segments file from the passed directory.
write
$segmentinfos->write($dir);
This will write the segments info file out.
add_element
$segmentinfos->add_element(Plucene::Index::SegmentInfo $segment_info);
This will add the passed Plucene::Index::SegmentInfo object..
info
my Plucene::Index::SegmentInfo $info
= $segmentinfos->info($segment_no);
This will return the Plucene::Index::SegmentInfo object at the passed segment number.
segments
my Plucene::Index::SegmentInfo @segment_info
= $segmentinfos->segments;
This returns all the Plucene::Index::SegmentInfo onjects in this segment.
perl v5.12.4 2011-08-14 Plucene::Index::SegmentInfos(3pm)
Check Out this Related Man Page
Plucene::TestCase(3pm) User Contributed Perl Documentation Plucene::TestCase(3pm)NAME
Plucene::TestCase - Handy functions when testing Plucene
SYNOPSIS
use Test::More tests => 10;
use Plucene::TestCase;
new_index {
add_document( foo => "bar" );
};
re_index {
add_document( foo => "baz" );
}
with_reader {
$READER->whatever;
}
my $hits = search("foo:ba*");
EXPORTS
$DIR
A directory which is created for the purposes of this test, in which the index will be placed. It will normally be cleaned up at the end
of the test, unless $Plucene::TestCase::DEBUG is set to allow you to peruse the entrails.
$WRITER
A variable holding the current "Index::Writer" object, if there is one.
$READER
A variable holding the current "Index::Reader" object, if there is one.
$ANALYZER
A variable holding the class name of the desired "Analysis::Analyzer" class.
new_index BLOCK (Analyzer)
Create a new index, and do the following stuff in the block before closing the index writer. $WRITER is set for the duration of the
block.
The optional parameter should be the class name of the analyzer to use; if not specified, the value from $ANALYZER, which in turn
defaults to "Plucene::Analysis::SimpleAnalyzer", will be used.
re_index BLOCK (Analyzer)
Same as "new_index", but doesn't create a new index, rather re-uses an old one.
add_document( field1 => value1, ...)
Add a new document to the index, with the given fields and values
with_reader BLOCK
Opens an index reader in $READER and runs the block.
search
Searches for the query given. If any fields are not specified, they will be assumed to be the default "text". Returns a
"Plucene::Search::Hits" object. The value of $ANALYZER will be used to construct an analyzer for the query string.
perl v5.12.4 2011-08-14 Plucene::TestCase(3pm)
Hi, can anyone explain me how this works (how the flow goes)?
Example:
CLIENT="UNIXHELP"
The second argument passed $2="UNIX"
RESULT=`awk -F"=" '/CLIENTS=/ {len = index($2,"'${CLIENT}'");print len }' $2`
Thanks in advance. (1 Reply)
Dear all,
I want to find the spectral Index from the reduced spectra of various molecular bands like TiO (band width 7042 angstrom-7046 angstrom) in the in IRAF. I have reduced the spectra in IRAF but now I don't know how to find these band strength (spectral indices) in IRAF.
... (0 Replies)
I try to search and read about bash scripting. So far Ive read a few of these:
The Beginner Guide to Writing Linux Shell Scripts
BASH Programming - Introduction HOW-TO
An A-Z Index of the Bash command line for Linux.
unix help
but I am a visual person that learns from repetition and errors.... (1 Reply)
I have Index Line and I tried to get the 9th character from the file and to check the character is "|" or not.
Shell Scripting.
Sample Index file.
"91799489|K8E|188.004.A.917994892.1099R.c.01.pdf|2013|10/15/2014|002|B|C|C"... (3 Replies)