Indexing and searching text with Lucene

Smart Search

Article from Issue 150/2013
Author(s):

Even state-of-the-art computers need to use clever methods to process ever-increasing amounts of document data. The open source Lucene framework uses inverted indexing for fast searches of document collections.

Nowadays, almost any commercially available hard drive can store more text than a whole library. In the digital world, a traditional system such as a card catalog or a knowledgeable librarian is no longer adequate to help find the right shelf. Even software equivalents such as find or zgrep are not always fast enough to track a particular piece of information amongst giga- or terabytes of data.

The science that deals with this type of search problem is called information retrieval. Computer scientists have developed sophisticated methods for tracking down files that users don’t even know exist. The free Java library Lucene implements some of these methods. Doug Cutting published an early version of Lucene in 1999. Two years later, the project, which carries the middle name of Cutting’s wife, came under the auspices of the Apache Foundation when it joined the Apache Jakarta Project. Lucene has been available in Version 4.0 since October 2012. The index file structures are backward compatible, so the transition from 3.6 to 4.0 does not cause any problems. Over the years, Lucene has become one of the most widely used solutions for indexing and searching text. (See the box titled “Lucene In All Its Facets.”)

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Apache Lucene Java Search Engine in Version 2.9

    The free Java search engine Apache Lucene is available in version 2.9. The release provides numerous new features and API enhancements.

  • Full-Text Search Engines

    Full-text search engines like Solr, Xapian, and Sphinx make the daily data chaos on your hard disk searchable – and they even cooperate with relational databases.

  • Do-It-Yourself Search Engine

    Build you own search engine using Apache's Nutch web crawler and Solr search platform.

  • Perl: Elasticsearch

    The Elasticsearch full-text search engine quickly finds expressions even in huge text collections. With a few tricks, you can even locate photos that have been shot in the vicinity of a reference image.

  • DocFetcher

    DocFetcher is a practical local search tool that is easy to configure and use – even for large data collections.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News