Main > Programming > Libraries >

Lucene 0.13

Lucene 0.13

Sponsored Links

Lucene 0.13 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.018 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 901
Date added: 2007-05-10
Publisher: Thomas Busch

Lucene 0.13 description

Lucene is a Perl API to the C++ port of the Lucene search engine.

SYNOPSIS

Initialize/Empty Lucene index

my $analyzer = new Lucene::Analysis::Standard::StandardAnalyzer();
my $store = Lucene::Store::FSDirectory->getDirectory("/home/lucene", 1);

my $tmp_writer = new Lucene::Index::IndexWriter($store, $analyzer, 1);
$tmp_writer->close;
undef $tmp_writer;

Choose your Analyzer (string tokenizer)

# lowercases text and splits it at non-letter characters
my $analyzer = new Lucene::Analysis::SimpleAnalyzer();
# same as before and removes stop words
my $analyzer = new Lucene::Analysis::StopAnalyzer();
# same as before but you provide your own stop words
my $analyzer = new Lucene::Analysis::StopAnalyzer([qw/that this in or and/]);
# splits text at whitespace characters
my $analyzer = new Lucene::Analysis::WhitespaceAnalyzer();
# lowercases text, tokenized it based on a grammer that
# leaves named authorities intact (e-mails, company names,
# web hostnames, IP addresses, etc) and removed stop words
my $analyzer = new Lucene::Analysis::Standard::StandardAnalyzer();
# same as before but you provide your own stop words
my $analyzer = new Lucene::Analysis::Standard::StandardAnalyzer([qw/that this in or and/]);
# takes string as it is (only when using clucene-0.9.17 or above)
my $analyzer = new Lucene::Analysis::KeywordAnalyzer();

Create a custom Analyzer

package MyAnalyzer;

use base Lucene::Analysis::Analyzer;

# You MUST called SUPER::new if you implement new()
sub new {
my $class = shift;
my $self = $class->SUPER::new();
# ...
return $self;
}

sub tokenStream {
my ($self, $field, $reader) = @_;
my $ret = new Lucene::Analysis::StandardTokenizer($reader);
if ($field eq "MyKeywordField") {
return $ret;
}
$ret = new Lucene::Analysis::LowerCaseFilter($ret);
$ret = new Lucene::Analysis::StopFilter($ret, [qw/foo bar bax/]);
return $ret;
}
package main;
my $analyzer = new MyAnalyzer;

Choose your Store (storage engine)

# in-memory storage
my $store = new Lucene::Store::RAMDirectory();
# disk-based storage
my $store = Lucene::Store::FSDirectory->getDirectory("/home/lucene", 0);

Open and configure an IndexWriter

my $writer = new Lucene::Index::IndexWriter($store, $analyzer, 0);
# optional settings for power users
$writer->setMergeFactor(100);
$writer->setUseCompoundFile(0);
$writer->setMaxFieldLength(255);
$writer->setMinMergeDocs(10);
$writer->setMaxMergeDocs(100);

Create Documents and add Fields

my $doc = new Lucene::Document;
# field gets analyzed, indexed and stored
$doc->add(Lucene::Document::Field->Text("content", $content));
# field gets indexed and stored
$doc->add(Lucene::Document::Field->Keyword("isbn", $isbn));
# field gets just stored
$doc->add(Lucene::Document::Field->UnIndexed("sales_rank", $sales_rank));
# field gets analyzed and indexed
$doc->add(Lucene::Document::Field->UnStored("categories", $categories));

Lucene 0.13 Screenshot

Advertisements

Lucene 0.13 Keywords

Bookmark Lucene 0.13

Hyperlink code:
Link for forum:

Lucene 0.13 Copyright

WareSeeker periodically updates pricing and software information of Lucene 0.13 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Lucene 0.13 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Version History
Related Software
PyLucene is a GCJ-compiled version of Java Lucene integrated with Python via SWIG. Free Download
kio-clucene provides an indexed search engine for KDE. Free Download
Plucene is a Perl port of the Lucene search engine. Free Download
SVGSlice is a simple tool which generates chopped up images from Inkscape SVG drawings. Free Download
Jnettop allows administrators of routers to watch online traffic coming across the network. Free Download
kdesvn is yet another client for subversion. Free Download
netspeed is a GNOME applet that shows the network traffic in kbytes/s. Free Download
PyLUcene SHell (Plush) is an interactive shell to inspect a Lucene store. Free Download