Dezi::Lucy::Indexer - Dezi::App Apache Lucy indexer
use Dezi::Lucy::Indexer; my $indexer = Dezi::Lucy::Indexer->new( config => Dezi::Indexer::Config->new(), invindex => Dezi::Lucy::InvIndex->new(), highlightable_fields => 0, );
Dezi::Lucy::Indexer is an Apache Lucy based indexer class based on SWISH::3.
All the SWISH::3 constants are imported into this namespace, including:
Only new and overridden methods are documented here. See the Dezi::Indexer documentation.
Implements basic object set up. Called internally by new().
In addition to the attributes documented in Dezi::Indexer, this class implements the following attributes:
Value should be 0 or 1. Default is 0. Passed directly to the constructor for Lucy::Plan::FullTextField objects as the value for the highlightable option.
highlightable
Called by the SWISH::3::handler() function for every document being indexed.
Calls commit() on the internal Lucy::Indexer object, writes the swish.xml header file and calls the superclass finish() method.
swish.xml
Returns the internal Lucy::Index::Indexer object.
Sets the internal Lucy::Index::Indexer to undef, which should release any locks on the index. Also flags the Dezi::Lucy::Indexer object as stale.
Some implementation notes about MetaNames and PropertyNames. See also http://dezi.org/2014/07/18/metanames-and-propertynames/.
A field defined as either a MetaName, PropertyName or both, can be searched.
Fields are matched against tag names in your XML/HTML documents. See also the TagAlias, UndefinedMetaTags, UndefinedXMLAttributes, and XMLClassAttributes directives.
You can alias field names with MetaNamesAlias and PropertyNamesAlias.
MetaNames are tokenized and case-insensitive and (optionally, with FuzzyIndexingMode) stemmed.
PropertyNames are stored, case-sensitive strings.
If a field is defined as both a MetaName and PropertyName, then it will be tokenized.
If a field is defined only as a MetaName, it will be parsed but not stored. That means you can search on the field but when you try and retrieve the field's value from the results, it will cause a fatal error.
If a field is defined only as a PropertyName, it will be parsed and stored, but it will not be tokenized. That means the field's contents are stored without being split up into words.
You can control the parsing and storage of PropertyName-only fields with the following additional directives:
case sensitive search
case insensitive search (default)
preserve whitespace
There are two default MetaNames defined: swishdefault and swishtitle.
There are two default PropertyNames defined: swishtitle and swishdescription.
The libswish3 XML and HTML parsers will automatically treat a <title> tag as swishtitle. Likewise they will treat <body> tag as swishdescription.
Things get complicated quickly when defining fields. Experiment with small test cases to arrive a the configuration that works best with your application.
Peter Karman, <karpet@dezi.org>
Please report any bugs or feature requests to bug-dezi-app at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-App. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-dezi-app at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Dezi::App
You can also look for information at:
Website
http://dezi.org/
IRC
#dezisearch at freenode
Mailing list
https://groups.google.com/forum/#!forum/dezi-search
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dezi-App
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Dezi-App
CPAN Ratings
http://cpanratings.perl.org/d/Dezi-App
Search CPAN
https://metacpan.org/dist/Dezi-App/
Copyright 2014 by Peter Karman
This library is free software; you can redistribute it and/or modify it under the terms of the GPL v2 or later.
http://dezi.org/, http://swish-e.org/, http://lucy.apache.org/
To install Dezi::App, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dezi::App
CPAN shell
perl -MCPAN -e shell install Dezi::App
For more information on module installation, please visit the detailed CPAN module installation guide.