Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
API:EPrints/Plugin/Search/Xapian
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==USAGE== Install the [http://search.cpan.org/search?query=xapian&mode=dist Search::Xapian] extension. Note: there are two Perl bindings available for Xapian. The CPAN version is older and based on Perl-XS. xapian-bindings-perl available from xapian.org is based on SWIG and has better coverage of the API. Regardless, for the best feature support/performance it is highly recommended to have the latest stable version of the Xapian library. Xapian uses a separate (from MySQL) index that is stored in <tt>archives/''[archiveid]''/var/xapian</tt>. To build the Xapian index you will need to reindex: <pre> ./bin/epadmin reindex [archiveid] eprint</pre> (Repeat for any other datasets you expect to use Xapian with.) The <tt>var/xapian/</tt> directory should contain something like: <pre> flintlock position.baseA position.DB postlist.baseB record.baseA record.DB termlist.baseB iamchert position.baseB postlist.baseA postlist.DB record.baseB termlist.baseA termlist.DB</pre> The indexing process for Xapian is in <tt>lib/cfg.d/search_xapian.pl</tt>. This can be overridden by dropping the same-named file into your repository <tt>archives/''[archiveid]''/cfg.d/</tt>. If the Xapian search is not matching what you might expect it to, you probably need to fix the indexing process (and re-index!). Terms indexed by Xapian can also be weighted to e.g. give names a higher weighting than abstract text. You will need to restart your Apache server to enable the Xapian search plugin and dependencies. If the Xapian search is working correctly you will have a "by relevance" option available in the ordering of simple search results. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_lock_files --> ===Lock Files=== Xapian maintains a lock file in <tt>archives/''[archiveid]''/var/xapian</tt>. If you see indexing errors about not being able to lock the database ensure you aren't running multiple copies of the EPrints [http://wiki.eprints.org/w/API:bin/indexer indexer]. If no other processes are running you may need to manually remove the lock file from the <tt>var/xapian</tt> directory. While only one process may modify the Xapian index at a time, any number of processes may concurrently read. <!-- Edit below this comment --> <!-- Pod2Wiki= --> <!-- Pod2Wiki=head_parameters -->
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)