SlideShare una empresa de Scribd logo
1 de 29
What’s New
in Apache Lucene 2.9
A Lucid Imagination
Technical White Paper
Abstract
Apache Lucene is a high-performance, cross-platform, full-featured Information Retrieval
library in open source, suitable for nearly every application that requires full-text search
features.

Since its introduction nearly 10 years ago, Apache Lucene has become a competitive player
for developing extensible, high-performance full-text search solutions. The experience
accumulated over time by the community of Lucene committers and contributors and the
innovations they have engineered have delivered significant ongoing advances in Lucene’s
capabilities.

This white paper describes the new features and improvements in the latest version,
Apache Lucene 2.9. It is intended mainly for programmers familiar with the broad base of
Lucene’s capabilities, though those new to Lucene should also find it a useful exploration of
the newest features.

In the simplest terms, Lucene is now faster and more flexible than before. Historic weak
points have been improved to open the way for innovative new features like near-real-time
search, flexible indexing, and high-performance numerical range queries. Many new
features have been added, new APIs introduced, and critical bugs have been fixed—all with
the same goal: improving Lucene’s state-of-the-art search capabilities.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page ii
Table of Contents
Introduction ............................................................................................................................................................ 1
Core Features and Improvements .................................................................................................................. 3
   Numeric Capabilities and Numeric Range Queries .............................................................................. 3
   New TokenStream API .................................................................................................................................... 7
   Per-Segment Search ...................................................................................................................................... 11
   Near Realtime Search (NRS) ...................................................................................................................... 12
   MultiTermQuery-Related Improvements ............................................................................................. 13
   Payloads ............................................................................................................................................................. 14
Additions to Lucene Contrib .......................................................................................................................... 16
   New Contrib Analyzers ................................................................................................................................ 16
   Lucene Spatial (formerly known as LocalLucene) ............................................................................ 16
   Lucene Remote and Java RMI .................................................................................................................... 18
   New Flexible QueryParser .......................................................................................................................... 18
   Minor Changes and Improvements in Lucene 2.9 ............................................................................. 19
Strategies for Upgrading to Lucene 2.9 ..................................................................................................... 21
   Upgrade to 2.9—Recommended Actions .............................................................................................. 21
   Upgrade to 2.9—Optional Actions ........................................................................................................... 22
References ............................................................................................................................................................ 23
Next Steps ............................................................................................................................................................. 24
APPENDIX: Choosing Lucene or Solr .......................................................................................................... 25




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                                                                                       Page iii
Introduction
Apache Lucene is a high-performance, cross-platform, full-featured Information Retrieval
library, in open source, suitable for nearly every application that requires full-text search
features. Lucene currently ranks among the top 15 open source projects and is one of the
top 5 Apache projects, with installations at over 4,000 companies. Downloads of Lucene,
and its server implementation Solr, have grown nearly tenfold over the past three years;
Solr is the fastest-growing Lucene subproject. Lucene and Solr offer an attractive
alternative to proprietary licensed search and discovery software vendors.1 With the
release of version 2.9 in September 2009, the Apache Lucene community delivered the
latest upgrade of Lucene.

This white paper aims to address key issues for you if you have an Apache Lucene-based
application, and need to upgrade existing code to work well with this latest version, so that
you may take advantage of the various improvements and prepare for the next major
release. If you do not have a Lucene application, the paper should also give you a good
overview of the innovations in this release.

Unlike the previous 2.4.1 release (March 2009), Lucene 2.9 is more than just a bug-fix
release. It introduces multiple performance improvements, new features, better runtime
behavior, API changes, and bug-fixes at a variety of levels. The 2.9 release improves Lucene
in several key aspects, which make it an even more compelling alternative to other
solutions. Most notably:
      •    Improvements for Near-Realtime Search capabilities make documents searchable
           almost instantaneously.
      •    A new, straightforward API for handling Numeric Ranges both simplifies
           development and virtually wipes out performance overhead.
      •    Analysis API has been replaced for more streamlined, flexible text handling.




1   See the Appendix for a discussion of when to choose Lucene or Solr.

What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                  Page 1
And, behind the scenes, the groundwork has been laid for yet more indexing flexibility in
future releases.
Lucene Contrib also adds new utility packages, introduced with this release:
   •   An extremely flexible query parser framework opens new possibilities for
       programmers to more easily create their own query parsing syntax.
   •   Local-Lucene and its geo-search capabilities, now donated to Apache, provide this
       near-mandatory functionality for state-of-the-art search.
   •   Various contributions have markedly improved support for languages like Arabic,
       Persian, and Chinese.
Some important notes on compatibility: because previous minor releases also contained
performance improvements and bug fixes, programmers have been accustomed to
upgrading to a new Lucene version just by replacing the JAR file in their classpath. And, in
those past cases, Lucene-based apps could be upgraded flawlessly without recompiling the
software components accessing or extending Apache Lucene. However, this may not be so
with Lucene 2.9.
Lucene 2.9 introduces several back-compatibility-breaking changes that may well require
changes in your code that uses the library. A drop-in library replacement is not guaranteed
to be successful; at a minimum, it is not likely to be flawless. As a result, we recommend
that if you are upgrading from a previous Lucene release, you should at least recompile any
software components directly accessing or extending the library. In the latter case,
recompilation alone will most likely not be sufficient. More details on these dependencies
are discussed in the “Upgrading Lucene” section of the paper. We’ve also noted any
significant compatibility issues with this label: [BACK-COMPATIBILITY].
Finally, it is important to note that Lucene 2.9 will be the last release supporting the Java
1.4 platform. While the majority of programmers are already running on either version 1.5
or 1.6 platforms (1.6 is our recommended JVM), Java 1.4 reached its end of service life in
October 2008.
This document is not intended to be a comprehensive overview of Lucene 2.9 in all its
functions, but rather the new key features and capabilities. Always check the Lucid
Imagination Certified distribution and the official Lucene Website
(http://lucene.apache.org) for the most up-to-date release information.



What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page 2
Core Features and Improvements

Numeric Capabilities and Numeric Range Queries
One of Apache Lucene's basic properties is its representation of internal searchable values
(terms) as UTF-8 encoded characters. Every value passed to Lucene must be converted into
a string in order to be searchable. At the same time, Lucene is frequently applied to search
numeric values and ranges, such as prices, dates, or other numeric field attributes.
Historically, searching over numeric ranges has been a weak point of the library. However,
the 2.9 release comes with a tremendous improvement for searching numeric values,
especially for range queries.
Prior to Lucene 2.9, numeric values were encoded with leading zeros, essentially as a full-
precision value. Values stored with full precision ended up creating many unique terms in
the index. Thus, if you needed to retrieve all documents in a certain range (e.g., from $1.50
to $1500.0) Lucene had to iterate through a lot of terms whenever many documents with
unique values were indexed. Consequently, execution of queries with large ranges and lots
of unique terms could be extremely slow as a result of this overhead.
Many workaround techniques have evolved over the years to improve the performance of
ranges, such as encoding date ranges in multiple fields with separate fields for year, month,
and day. But at the end of the day, every programmer had to roll his or her own way of
searching ranges efficiently.
In Lucene 2.9, NumericUtils and its relatives (NumericRangeQuery /
NumericRangeFilter) introduce native numeric encoding and search capabilities.
Numeric Java primitives (long, int, float, and double) are transformed into prefix-
encoded representations with increasing precision. Internally each prefix precision is
generated by stripping off the least significant bits indicated by the precisionStep. Each
value is subsequently converted to a sequence of 7-bit ASCII characters (due to the UTF-8
term encoding in the index, 8 or more bits would split into two or more bytes) resulting in
a predictable number of prefix-terms that can be calculated ahead of time. The figure below
illustrates such a Prefix Tree.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page 3
Example of a Prefix Tree, where the leaves of the tree hold the actual term values and all the descendants of a
node have a common prefix associated with the node. Bold circles mark all relevant nodes to retrieve a range
from 215 to 977.



The generated terms are indexed just like any other string values passed to Lucene. Under
the hood, Lucene associates distinct terms with all documents containing the term, so that
all documents containing a numeric value with the same prefix are “grouped” together,
meaning the number of terms that need to be searched is reduced tremendously. This
stands in contrast to the relatively less efficient encoding scheme in previous releases,
where each unique numeric value was indexed as a distinct term based on the number of
terms in the index.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                                   Page 4
Directory directory = new RAMDirectory();
    Analyzer analyzer = new WhitespaceAnalyzer();
    IndexWriter writer = new IndexWriter(directory, analyzer,
    IndexWriter.MaxFieldLength.UNLIMITED);
    for (int i = 0; i < 20000; i++) {
        Document doc = new Document();
        doc.add(new Field("id", String.valueOf(i), Field.Store.YES,
        Field.Index.NOT_ANALYZED_NO_NORMS));
        String num = Integer.toString(i);
        String paddedValue = "00000".substring(0, 5 - num.length()) +
        num;
        doc.add(new Field("oldNumeric", paddedValue, Field.Store.YES,
        Field.Index.NOT_ANALYZED_NO_NORMS));
        writer.addDocument(doc);
    }
    writer.close();
Indexing a zero-padded numeric value for use with an ordinary RangeQuery.



You can also use the native encoding of numeric values beyond range searches. Numeric
fields can be loaded in the internal FieldCache, where they are used for sorting. Zero-
padding of numeric primitives (see code example above) is no longer needed as the trie-
encoding guarantees the correct ordering without requiring execution overhead or extra
coding.
The code listing below instead uses the new NumericField to index a numeric Java
primitive using 4-bit precision. Like the straightforward NumericField, querying
numeric ranges also provides a type-safe API. NumericRangeQuery instances are
created using one of the provided static constructors for the corresponding Java primitive.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                              Page 5
Directory directory = new RAMDirectory();
   Analyzer analyzer = new WhitespaceAnalyzer();
   IndexWriter writer = new IndexWriter(directory, analyzer,
   IndexWriter.MaxFieldLength.UNLIMITED);
   for (int i = 0; i < 20000; i++) {
       Document doc = new Document();
       doc.add(new Field("id", String.valueOf(i), Field.Store.YES,
       Field.Index.NOT_ANALYZED_NO_NORMS));
       doc.add(new NumericField("newNumeric", 4,
       Field.Store.YES, true).setIntValue(i));
       writer.addDocument(doc);
   }
   writer.close();
Indexing numeric values with the new NumericField type

The example below shows a numeric range query using an int primitive with the same
precision used in the indexing example. If different precision values are used at index or
search time, numeric queries can yield unexpected behavior.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page 6
IndexSearcher searcher = new IndexSearcher(directory, true);
   Query query = NumericRangeQuery.newIntRange("newNumeric", 4, 10,
   10000, true, false);
   TopDocs docs = searcher.search(query, null, 10);
   assertNotNull("Docs is null", docs);
   assertEquals(9990, docs.totalHits);
   for (int i = 0; i < docs.scoreDocs.length; i++) {
       ScoreDocs d= docs.scoreDocs[i];
       assertTrue(sd.doc >= 10 && sd.doc < 10000);
   }
Searching numeric values with the new NumericRangeQuery



Improvements resulting from new Lucene numeric capabilities are equally significant in
versatility and performance. Now, Lucene can cover almost every use-case related to
numeric values. Moreover, range searches or sorting on float or double values up to fast
date searches (dates converted to time stamps) will execute in less than 100 milliseconds
in most cases. By comparison, the old approach using padded full-precision values could
take up to 30 seconds or more depending on the underlying index.


New TokenStream API
Almost every programmer who has extended Lucene has worked with its analysis function.
Text analysis is common to almost every use-case, and is among the best known Lucene
APIs.
Since its early days, Lucene has used a “Decorator Pattern” to provide a pluggable and
flexible analysis API, allowing a combination of existing and customized analysis
implementations. The central analysis class TokenStream enumerates a sequence of
tokens from either a document's fields or from a query. Commonly, multiple
TokenStream instances are chained, each applying a separate analysis step to text terms
represented by a Token class that encodes all relevant information about a term.
Prior to Lucene 2.9, TokenStream operated exclusively on Token instances transporting
term information through the analysis chain. With this release, the token-based API has
been marked as deprecated. It is completely replaced by an attribute-based API.

What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                             Page 7
Here’s how it has changed. Rather than receiving a Token instance from one of the two
TokenStream.next() methods, the new API follows a stateful approach instead. To
advance in the stream, consumers call TokenStream.incrementToken(), which
returns a Boolean result indicating if the end of the stream has been reached. Information
gathered during the analysis process is encoded in attributes accessible via the new
TokenStream base class AttributeSource. In contrast to the older Token class, the
Attribute-based approach separates specific term characteristics from others not
necessarily related. Each TokenStream adds the attributes it is specifically targeting at
construction time (see code listing below) and keeps a reference to it throughout its
lifetime. This provides type-safe access to all attributes relevant for a particular
TokenStream instance.


   protected CharReplacementTokenStream(TokenStream input) {
       super(input);
       termAtt = (TermAttribute) addAttribute(TermAttribute.class);
   }
Adding a TermAttribute at construction time

Inside TokenStream.incrementToken(), a token stream only operates on attributes
that have been declared in the constructor. For instance, if you have Lucene replacing a
character like a German umlaut in a term, only the TermAttribute (declared at
construction time in the code listing above) is used. (Other attributes like
PositionIncrementAttribute or PayloadAttribute are ignored by this
TokenStream as they might not be needed in this particular use-case.)




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                             Page 8
public boolean incrementToken() throws IOException {
    if (input.incrementToken()) {
        final char[] termBuffer = termAtt.termBuffer();
        final int termLength = termAtt.termLength();
        if (replaceChar(termBuffer, termLength)) {
                 termAtt.setTermBuffer(output, 0, outputPos);
    }
        return true;
    }
    return false;
    }
Replacing characters using the new attribute based API.

What the above example does not demonstrate is the full power of the new token API.
There, we replaced one or more characters in the token and discarded the original one. Yet,
in many use-cases, the original token should be preserved in addition to the modified one.
Using the old API required a fair bit of work and logic to handle such a common use-case.
In contrast, the new attribute-based approach allows capture and restoration of the state of
attributes, which makes such use-cases almost trivial. The example below shows a version
of the previous example improved for Lucene 2.9, in which the original term attribute is
restored once the stream is advanced.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                             Page 9
public boolean incrementToken() throws IOException {
    if (state != null) {
        restoreState(state);
        state = null;
        return true;
    }
    if (input.incrementToken()) {
        final char[] termBuffer = termAtt.termBuffer();
        final int termLength = termAtt.termLength();
        if (replaceChar(termBuffer, termLength)) {
                 state = captureState();
                 termAtt.setTermBuffer(output, 0, outputPos);
        }
        return true;
    }
    return false;
    }
Replacing characters and additionally emitting the original term text using the new Attribute based API (position
increments are omitted).



The separation of attributes makes it possible to add arbitrary properties to the analysis
chain without using a customized Token class. Attributes are then made type-safely
accessible by all subsequent TokenStream instances, and can eventually be used by the
consumer. This way, you get a generic way to add various kind of custom information, such
as part-of-speech tags, payloads, or average document length to the token stream.
Unfortunately, Lucene 2.9 doesn't yet provide functionality to persist custom Attribute
implementation to the underlying index. This improvement, part of what is often referred
to as "flexible indexing," is under active development and is proposed for one of the
upcoming Lucene releases.
Beyond the generalizability of this API, one of its most significant improvements is its
effective reuse of Attribute instances across multiple iterations of analysis. Attribute


What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                                Page 10
implementations are created during TokenStream instantiation and are reused each time
the stream advances to a successive increment. Even if a stream is used for another
analysis, the same Attribute instances may be used, provided the stream is reusable.
This greatly reduces the rate of object creation, streamlining execution and minimizing any
required garbage collection.
While the new API provides full back-compatibility, it is strongly recommended to update
any existing custom TokenStream implementations to exclusively use
incrementToken instead of one of the overhead-heavy next() methods.
If you are trying to update your custom TokenStream or one of its subclass
(TokenFilter and Tokenizer) implementations, it is recommended that you use the
abstract BaseTokenStreamTestCase class, which provides various utility functions for
testing against the new and old API. The test case is freely available for download in the
source distribution of Apache Lucene 2.9.


Per-Segment Search
Since the early days of Apache Lucene, documents have been stored at the lowest level in a
segment—a small but entirely independent index. On the highest abstraction level, Lucene
combines segments into one large index and executes searches across all visible segments.
As more and more documents are added to an index, Lucene buffers your documents in
RAM and flushes them to disk periodically. Depending on a variety of factors, Lucene either
incrementally adds documents to an existing segment, or creates entirely new segments. To
reduce the negative impact of an increasing number of segments on search performance,
Lucene tries to combine/merge multiple segments into larger ones. For optimal search
performance, Lucene can optimize an index that essentially merges all existing segments
into a single segment.
Prior to Lucene 2.9, search logic resided at the highest abstraction level, accessing a single
IndexReader no matter how many segments the index was composed of. Similarly the
FieldCache was associated with the top-level IndexReader, and then had to be
invalidated each time an index was reopened. With Lucene 2.9, the search logic and the
FieldCache have moved to a per-segment level. While this has introduced a little more
internal complexity, the benefit of the tradeoff is a new per-segment index behavior that
yields a rich variety of performance improvements for unoptimized indexes.



What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                Page 11
In most applications, existing segments rarely change internally, and this property had not
been effectively utilized in previous versions of Lucene. IndexReader.reopen(), first
added in Lucene 2.4, now has the ability to add new or changed segments to an already
existing top-level IndexReader instead of reloading all existing segments. The
FieldCache also takes advantage of rarely changing segments. Cache instances of
unchanged or updated segments can remain in memory or need only be rebuilt instead of
invalidating the FieldCache entirely. Depending on the number of changed index
segments, this can heavily reduce I/O as well as garbage collection costs, compared to
reopening the entire index.
Previous versions of Lucene also suffered from long warming time for sorting and function
queries. Those use-cases have been improved as the warm-up of reopened searchers is
now much faster.
It's worth mentioning that Per-Segment Search doesn't yield improvements in all situations.
If an IndexReader is opened on an optimized index, all pre-existing segments are merged
into a single one, which then loads in its entirety. In other situations, perhaps more
common, where some changes have been committed to the index and a new
IndexReader instance is obtained by calling IndexReader.reopen() on a previously
opened reader, the new per-segment capabilities can dramatically speed up reopening. But
in this case, opening a new IndexReader using one of the overloaded static
IndexReader.open() methods will create an entirely new reader instance and
therefore can't take advantage of any per-segment capabilities.


Near Realtime Search (NRS)
More and more, Lucene programmers are pursuing real-time or near real-time
requirements with their search applications. Previous Lucene versions did a decent job
with the incremental changes characteristic of this scenario, capturing those changes and
making them available for searching. Lucene 2.9 adds significant new capabilities for
addressing the requirements of high-change document environments.
First of all, the IndexWriter – in general responsible for modifying the underlying index
and flushing documents to disk – —now offers a way to obtain an IndexReader instance
directly from the writer. The newly obtained reader then not only reflects the documents
already flushed to disk, but also makes all uncommitted documents still residing in
memory almost instantly searchable.


What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                            Page 12
The reader instance returned by IndexWriter.getReader() supports reopening the
reader as long as the writer releasing the reader has not been committed. Once it is
committed, re-opening the reader will result in an AlreadyClosedExecption.
It is important to understand why this feature is referred to as “near real-time” rather than
“real-time.” When IndexWriter.getReader() is called for the very first time, Lucene
needs to consume a reasonable amount of additional resources (i.e., RAM, CPU-cycles, and
file descriptors) to make uncommitted documents searchable. Due to this additional work,
uncommitted documents will not always be available instantaneously. Nonetheless, in most
cases, the performance gained with this feature will be better than just reopening the
index, or the traditional simpler approach of opening a brand new reader instance.
To keep the latency as low as possible, the IndexWriter offers an optional “pre-warmup”
functionality, by which newly merged segments can be prepared for real-time search. If you
are new to this feature, you should be aware that the pre-warmup API is still marked
experimental and might change in future releases.


MultiTermQuery-Related Improvements
In Lucene 2.4, many standard queries, such as FuzzyQuery, WildcardQuery, and
PrefixQuery were re-factored and subclassed under MultiTermQuery. Lucene 2.9
adds some improvements under the hood, resulting into much better performance for
those queries. [BACK- COMPATIBILITY] 2
In Lucene 2.9, multi-term queries now use a constant score internally, based on the
assumption that most programmers don't care about the interim score of the queries
resulting from the term expansion that takes place during query rewriting.




2   This could be a back-compatibility issue if one of those classes has been subclassed.

What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                Page 13
Although constant-scoring is now the default behavior, the older scoring mode is still
available for multiterm queries in 2.9. Beyond that, you can choose one of the following
scoring modes:
        Filtered constant score: rewrites the multiterm query into a
        ConstantScoreQuery in combination with a filter to match all relevant
        documents.
        BooleanQuery constant score: rewrites the multiterm query into a
        ConstantScoreQuery based on a BooleanQuery by translating each term into
        an optional Boolean clause. This mode still has a limitation of maxClauseCount and
        might raise an exception if the query has too many Boolean clauses.
        Conventional scoring (not recommended): rewrites the multiterm query into an
        ordinary BooleanQuery.
        Automatic constant score (default): tries to choose the best constant score mode
        (Filter or BooleanQuery) based on term and document counts from the query.
        If the number of terms and documents is small enough, BooleanQuery is chosen,
        otherwise the query rewrites to a filter-backed ConstantScoreQuery.
You can change the scoring mode by passing an implementation of RewriteMethod to
MultiTermQuery.setRewriteMethod() as shown in the code example below.
    PrefixQuery prefixQuery = new PrefixQuery(new Term("aField",
    "luc"));
    prefixQuery.setRewriteMethod(
    MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE);
Explicitly setting a filtered constant-score RewriteMethod on a PrefixQuery



Payloads
The Payloads feature, though originally added in a previous version of Lucene, remains
pretty new to most programmers. A payload is essentially a byte array that is associated
with a particular term in the index. Payloads can be associated with a single term during
text analysis and subsequently committed directly to the index. On the search side, these
byte arrays are accessible to influence the scoring for a particular term, or even to filter
entire documents.



What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page 14
For instance, if your Lucene application is analyzing the phrase “Gangs of New York”,
payloads can encode information about the terms “New” and “York” together, so that they
are treated as a paired term for the name of a city, or can specify that “Gangs” is a noun
rather than a verb. Prior to 2.9, payloads were exposed via a query called
BoostingTermQuery, which has now been renamed to PayloadTermQuery. By using
this query type, you can query Lucene to find all occurrences where “New” is a part of a city
name like “New York” or “New Orleans”.
In comparison with previous versions, Lucene 2.9 also provides more control and flexibility
for payload scoring. You can pass a custom PayloadFunction to the constructor of a
payload-aware query. Each payload is fed back to the custom function, which calculates the
score based on the cumulative outcomes of payload occurrences.
This improvement becomes even more useful when payloads are used in combination with
span queries. Spans represent a range of term positions in a document, whereas in turn,
payloads can help scoring based on the distance between terms. For instance, using a
PayloadNearQuery , documents can be scored differently if terms are in the same
sentence or paragraph if that information is encoded in the payload.
At a higher abstraction level, another payload aware TokenFilter has been added.
DelimitedPayloadTokenFilter splits tokens separated by a predefined character
delimiter, where the first part of the token is the token itself and the second part after the
delimiter represents the payload. For example, it can parse an e-mail address, for example
carol.smith@apache.org, by making “carol.smith” the token, and creating a payload to
represent the domain name, “apache.org”. A customizable payload-encoder takes care of
encoding the values while everything else magically happens inside the filter. Besides being
a convenient way to add payloads to existing search functionality, this class also serves as a
working example of how to use payloads during the analysis process3.




3
    See http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/ for more information.

What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                                 Page 15
Additions to Lucene Contrib
So far, we’ve reviewed key new features and improvements introduced in the Apache
Lucene core API. This section outlines the major additions and improvements to Lucene
Contrib packages. Contrib packages are parts of Lucene which do not necessarily belong to
the API core but are often helpful in building Lucene applications.


New Contrib Analyzers
The Analysis package in Lucene Contrib has always been a valuable source for almost every
Lucene programmer. The latest release brings several noteworthy improvements
especially in terms of language support.
   •   Better support for Chinese: Chinese, like many Asian languages, does not use white
       spaces to delimit one word from another, nor is punctuation used at all. Smart-CN
       provides an analyzer with improved tokenization and capabilities in splitting
       individual characters. While Smart-CN is part of the analyzers contrib module, it is
       distributed in its own JAR file because of the large (6MB) file resources it depends
       on.
   •   “Light10”-based Arabic analysis: a new Analyzer based on a high-performance
       stemming algorithm (Light10) applying lightweight prefix and suffix removal to
       Arabic text.
   •   Persian Analyzer: applying character normalization and Persian stopword removal
       to Persian-only or mixed language text.
   •   Reverse String filter, as in leading wildcards: to support a search feature like leading
       wildcards efficiently, one of the common tricks/approaches is to index terms in
       reverse order. A leading wildcard effectively becomes a trailing wildcard if searched
       against a field with reversed tokens.


Lucene Spatial (formerly known as LocalLucene)
Geospatial search has become a very common use-case, especially with the advent of
mobile devices. Almost every new mobile platform supports a “nearby” search feature. End
users seeking data on something near their current location (restaurants, movie theatres,



What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page 16
plumbers, etc.) expect both that results are limited to within a certain range, and that
results can be ranked by distance from the end user’s location.
In early 2009, an open source project formerly known as LocalLucene was donated to
Apache Lucene and integrated as a contrib package. Lucene Spatial extends Lucene
capabilities with support for geographical and location-based search.
While Lucene Spatial doesn't have any distance scoring capabilities, it can effectively help
to filter and sort based on geographical information like longitude and latitude values.
Filtering is an especially common use-case, when combined with a full-text query. In
searching for “French restaurant” within 5 miles from a specific location, the filter restricts
down the search space to documents with location fields within 5 miles; the rest of the
search operation is implemented in core Lucene.
Lucene Spatial has a couple of different ways to encode geographic information:
           GeoHash: a hierarchical spatial data structure that subdivides space into buckets
           in a grid shape. GeoHash takes the even bits from the longitude value while the
           odd bits are taken from the latitude value. The result is an arbitrary precision
           base 32-encoded string that offers the property of gradually removing
           characters from the end of the string to reduce the size and precision of the code.
           Nearby places are likely to have similar prefixes due to this property.
           Cartesian Tiers: projects the world on a flat surface. Overlays to this projection
           are created as grids (Cartesian Tiers), with each tier having an increasing
           number (always by a power of two) of grid boxes on it dividing up the
           projection. Location data can be placed within one of the grid boxes with
           different precision depending on the number of grid boxes on the tier.
Both of the above allow efficient storage of geo-information in a Lucene index. In contrast
to plain latitude and longitude values indexed in separate fields, GeoHash and Cartesian
Tiers encode in a single field.
Note that despite its previous releases under a different name (LocalLucene), the Lucene
Spatial API still isn't considered stable and might change in future releases.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                Page 17
Lucene Remote and Java RMI
The historic dependency on Java RMI from the Lucene core has now been removed: Lucene
Remote is now partitioned into an optional contrib package. While the package itself
doesn't add any functionality to Lucene it introduces a critical back-compatibility issue
likely to be relevant for many programmers. In prior versions, the core-interface
Searchable extended java.rmi.Remote to enable searches on remote indexes. If you
had taken advantage of this convenience, you will now have to add the new Lucene-remote
JAR file to the classpath and change their code to use the new remote base interface
RMIRemoteSearchable as shown below.


   final RMIRemoteSearchable remoteObject = ...;
   final String remoteObjectName = ...;
   Naming.rebind (remoteObjectName, remoteObject);
   Searchable searchable = (Searchable)Naming.lookup(remoteObjectName);
                               Using RemoteSearchable with Lucene 2.9



New Flexible QueryParser
Lucene’s built-in query parser has been a burden on developers trying to extend the default
query syntax. While changing certain parts of it, such as query instantiation, could be
readily achieved by subclassing the parser, changing the actual syntax required deep
knowledge of the JavaCC parser-generator.
The new contrib package QueryParser provides a complete query parser framework,
which is fully compliant with the core parser but enables flexible customization by using a
modular architecture.
The basic idea of the new query parser is to separate the syntax from the semantics of a
query, internally represented as a tree. Ultimately the parser splits up in three stages:
   1. Parsing stage: transforms the query text (syntax) into a QueryNode tree. This stage is
      exploited by a single interface (SyntaxParser) mandatory for custom
      implementation of this stage.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                             Page 18
2. Query-Node processing stage: once the QueryNode tree is created, a chain of
      processors start working on the tree. While walking down the tree, a processor can
      apply query optimizations, child reordering, or term tokenization even before the
      query is actually executed.
   3. Building stage: the final stage builds the actual Lucene Query object by mapping
      QueryNode types to associated builders. Each builder subsequently applies the
      actual conversion into a Lucene query.
The snippet below, taken from the new standard QueryParser implementation, shows how
the stages are exposed at the API's top level.


   QueryNode queryTree = this.syntaxParser.parse(query, getField());
   queryTree = this.processorPipeline.process(queryTree);
   return (Query) this.builder.build(queryTree);


To provide a smooth transition from the existing core parser to the new API, this contrib
package also contains an implementation fully compliant with the standard query syntax.
This not only helps the switch to the new query parser but it also serves as an example of
how to use and extend the API. That said, the standard implementation is based on the new
query parser API and therefore it can't simply replace a core parser as is. If you have been
replacing Lucene's current query parser, you can use QueryParserWrapper instead,
which preserves the old query parser interface but calls the new parser framework. One
final caveat: the QueryParserWrapper is marked as deprecated, as the new query parser
will be moved to the core in the upcoming release and eventually replace the old API.


Minor Changes and Improvements in Lucene 2.9
Beside the improvements and entirely new features, Lucene 2.9 contains several minor
improvements worth mentioning. The following points are a partial outline of minor
changes.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                            Page 19
Term vector-based highlighter: a new term highlighter implementation based on
           term vectors (essentially a view of terms, offsets, and positions in a documents
           field). It supports features like N-Gram fields and phrase-unit highlighting with
           slops and yields good performance on large documents. The downside is that it
           requires a lot more disk space due to stored term vectors.
           [BACK- COMPATIBILITY] Collector replaces HitCollector: the low-level HitCollector
           was deprecated and replaced with a new Collector class. Collector offers a
           more efficient API to collect hits across sequential IndexReader instances. The
           most significant improvement here is that score calculation is now decoupled
           from collecting hits or skipped entirely if not needed—a nice new efficiency.
           Improved String “interning”: Lucene 2.9 internally uses a custom String intern
           cache instead of Java's default String.intern(). The lockless
           implementation yields minor internal performance improvements.
           New n-gram distance: a new n-gram–based distance measure was added to the
           contrib spellcheck package.
           [BACK- COMPATIBILITY] Weight is now an abstract class: the Weight interface was
           refactored to an abstract class including minor method signature changes.
           ExtendedFieldCache marked deprecated: All methods and parsers from the
           interface ExtendedFieldCache have been moved into FieldCache.
           ExtendedFieldCache is now deprecated and contains only a few
           declarations for binary backwards compatibility.
           [BACK- COMPATIBILITY] MergePolicy interface changed: MergePolicy now requires
           an IndexWriter instance to be passed upon instantiation. As a result,
           IndexWriter was removed as a method argument from all MergePolicy
           methods.
For a complete list of improvements, bug-fixes, compatibility, and runtime behavior
changes you should consult the CHANGES.txt file included in the Lucene distribution
(http://lucene.apache.org/java/2_9_0/changes/Changes.html).




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                              Page 20
Strategies for Upgrading to Lucene 2.9
In the main, a Lucene-based application will benefit from the improvements in 2.9, even as
its new features such as numeric capabilities and the new TokenStream API do require
code modifications and may require reindexing in order to take full advantage. That said,
compared to previous version changes, an upgrade to version 2.9 requires a more
sophisticated upgrade procedure.
True, there are many cases in which an upgrade won't require code changes, as changes
limited to “expert” APIs won't affect applications only using high-level functionality. All the
same, even if an application complies with Lucene 2.9, it is likely that some of the changes
in runtime characteristics can introduce unexpected behaviors. In the sections below, we’ll
offer some brief suggestions for making the transition.
In the months ahead, the next major version of Apache Lucene will be underway. That said,
one cannot assume that an upgrade to 2.9 is not worthwhile given the numbering of the
next release (i.e., version 3.0). It is also slated to be a deprecation release, in which all
deprecated-marked code in Lucene 2.9 will be removed. Some parts of the API might be
modified in order to make use of Java Generics, but in general the upgrade from 2.9 to 3.0
should be as seamless as earlier upgrades have been. Once you have replaced the usage of
any deprecated API(s) in your code, you should then be able to upgrade the next time
simply by replacing the Lucene JAR file.


Upgrade to 2.9—Recommended Actions
At a minimum, if you plan an upgrade of your search application to Lucene 2.9, you should
recompile your application against the new version before the application is rolled out in a
production environment. The most critical issues will immediately raise a compile-time
error once the JAR is in the classpath.
For those of you using Lucene from a single location, for example, in the JRE's ext directory,
you should make sure that 2.9 is the only Lucene version accessible. In cases where an
application relies on extending Lucene in any particular way and the upgrade doesn't raise
a compile-time error, it is recommended that you add a test-case for the extension based on
the behavior executed against the older version of Lucene.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                                Page 21
It is also extremely important that you backup and archive your index before opening it
with Lucene 2.9, as it will make changes to the index that may not be readable by previous
versions.
Again, we strongly recommend a careful reading of the CHANGES.txt file included in every
Lucene distribution, especially the sections on back-compatibility policy and on changes in
runtime behavior. Careful study followed by proper planning and testing should prevent
you from running into any surprises once the new Lucene 2.9-based application goes into
production.


Upgrade to 2.9—Optional Actions
Lucene 2.9 includes many new features that are not required for use of the new release.
Nevertheless, 2.9 has numerous parts of the API marked as deprecated, since they are to be
removed in the next release. To prepare for the next release and further improvements in
this direction, it is strongly recommended that you replace any deprecated API during the
upgrade process.
Applications using any kind of numeric searches can improve their performance heavily by
replacing custom solution with Lucene's Numeric Capabilities described earlier in this
white paper.
Last but not least, the new TokenStream API will replace the older API entirely in the next
release. Custom TokenStream, TokenFilter, and Tokenizer implementations
should be updated to the attribute-based API. Here, the source distribution contains basic
test cases that can help you safely upgrade.
Finally, to reiterate, you would do best to write new added test cases against their current
Lucene version, and upgrade the test and your code once you have gained enough
confidence in the stability of the upgrade.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                              Page 22
References
http://lucene.apache.org/java/2_9_0/index.html
http://lucene.apache.org/java/2_9_0/changes/Changes.html
http://lucene.apache.org/java/2_9_0/changes/Contrib-Changes.html
http://www.lucidimagination.com/Community/Hear-from-the-Experts/Podcasts-and-
Videos/Interview-Uwe-Schindler
http://wiki.apache.org/lucene-java/NearRealtimeSearch
http://wiki.apache.org/lucene-java/Payloads
http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/
http://wiki.apache.org/lucene-java/ConceptsAndDefinitions
http://wiki.apache.org/lucene-java/FlexibleIndexing
http://wiki.apache.org/lucene-java/Java_1.5_Migration
http://www.lucidimagination.com/How-We-Can-Help/webinar-Lucene-29
http://www.nsshutdown.com/projects/lucene/whitepaper/locallucene_v2.html
http://www.lucidimagination.com/Community/Hear-from-the-Experts/Podcasts-and-
Videos/Interview-Ryan-McKinley
http://ocw.kfupm.edu.sa/user062/ICS48201/NLLight%20Stemming%20for%20Arabic%
20Information%20Retrieval.pdf
https://javacc.dev.java.net/




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                    Page 23
Next Steps
For more information on how Lucid Imagination can help search application developers,
employees, customers, and partners find the information they need, please visit
http://www.lucidimagination.com to access blog posts, articles, and reviews of dozens of
successful implementations.
Certified Distributions from Lucid Imagination are complete, supported bundles of
software which include additional bug fixes, performance enhancements, along with our
free 30-day Get Started program. Coupled with one of our support subscriptions, a Certified
Distribution can provide a complete environment to develop, deploy, and maintain
commercial-grade search applications. Certified Distributions are available at
www.lucidimagination.com/Downloads.
Please e-mail specific questions to:
Support and Service: support@lucidimagination.com
Sales and Commercial: sales@lucidimagination.com
Consulting: consulting@lucidimagination.com
Or call: 1.650.353.4057




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                           Page 24
APPENDIX: Choosing Lucene or Solr
The great improvements in the capabilities of Lucene and Solr open source search
technology have created rapidly growing interest in using them as alternatives for their
search applications. As is often the case with open source technology, online community
documentation provides rich details on features and variations, but does little to provide
explicit direction on which technologies would be the best choice. So when is Lucene
preferable to Solr and vice versa?
There is in fact no single answer, as Lucene and Solr bring very similar underlying
technology to bear on somewhat distinct problems. Solr is versatile and powerful, a full-
featured, production-ready search application server requiring little formal software
programming. Lucene presents a collection of directly callable Java libraries, with fine-
grained control of machine functions and independence from higher-level protocols.
In choosing which might be best for your search solution, the key questions to consider are
application scope, deployment environment, and software development preferences.
If you are new to developing search applications, you should start with Solr. Solr provides
scalable search power out of the box, whereas Lucene requires solid information retrieval
experience and some meaningful heavy lifting in Java to take advantage of its capabilities.
In many instances, Solr doesn’t even require any real programming.
Solr is essentially the “serverization” of Lucene, and many of its abstract functions are
highly similar, if not the just the same. If you are building an app for the enterprise sector,
for instance, you will find Solr almost a 100% match to your business requirements: it
comes ready to run in a servlet container such as Tomcat or Jetty, and ready to scale in a
production Java environment. Its RESTful interfaces and XML-based configuration files can
greatly accelerate application development and maintenance. In fact, Lucene programmers
have often reported that they find Solr to contain “the same features I was going to build
myself as a framework for Lucene, but already very well implemented.” Once you start with
Solr, and you find yourself using a lot of the features Solr provides out of the box, you will
likely be better off using Solr’s well organized extension mechanisms instead of starting
from scratch using Apache Lucene.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                               Page 25
If, on the other hand, you do not wish to make any calls via HTTP, and wish to have all of
your resources controlled exclusively by Java API calls that you write, Lucene may be a
better choice. Lucene can work best when constructing and embedding a state-of-the-art
search engine, by allowing programmers to assemble and compile inside a native Java
application. Some programmers set aside the convenience of Solr in order to more directly
control the large set of sophisticated features with low-level access, data, or state
manipulation, and choose Lucene instead, for example, with byte-level manipulation of
segments or intervention in data I/O. Investment at the low level enables development of
extremely sophisticated, cutting edge text search and retrieval capabilities.
As for features, the latest version of Solr generally encapsulates the latest version of
Lucene. As the two are in many ways functional siblings, spending time gaining a solid
understanding how Lucene works internally can help you understand Apache Solr and its
extension of Lucene's workings.
No matter which you choose, the power of open source search is yours to harness. More
information on both Lucene and Solr can be found at www.lucidimagination.com.




What’s New in Lucene 2.9
A Lucid Imagination Technical White Paper • October 2009                           Page 26

Más contenido relacionado

La actualidad más candente

SAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA MonitoringSAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA MonitoringLinh Nguyen
 
The Taverna 2 Platform
The Taverna 2 PlatformThe Taverna 2 Platform
The Taverna 2 PlatformTom Oinn
 
S/4HANA Installation Quickstart Guide and Monitoring S/4HANA
S/4HANA Installation Quickstart Guide and Monitoring S/4HANAS/4HANA Installation Quickstart Guide and Monitoring S/4HANA
S/4HANA Installation Quickstart Guide and Monitoring S/4HANALinh Nguyen
 
An evaluation of distributed datastores using AppScale Cloud Platform
An evaluation of distributed datastores using AppScale Cloud PlatformAn evaluation of distributed datastores using AppScale Cloud Platform
An evaluation of distributed datastores using AppScale Cloud Platformhimanshuvaishnav
 
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The UnionDataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The UnionWangda Tan
 
"SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011- Łukas...
"SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011-  Łukas..."SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011-  Łukas...
"SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011- Łukas...Łukasz Grala
 
Effective Testing of Apache Accumulo Iterators
Effective Testing of Apache Accumulo IteratorsEffective Testing of Apache Accumulo Iterators
Effective Testing of Apache Accumulo IteratorsJosh Elser
 
Mule ESB - Consuming RESTful WS with RAML Definition
Mule ESB - Consuming RESTful WS with RAML DefinitionMule ESB - Consuming RESTful WS with RAML Definition
Mule ESB - Consuming RESTful WS with RAML DefinitionGiuseppe De Michele
 
Apache Ambari - What's New in 2.0.0
Apache Ambari - What's New in 2.0.0Apache Ambari - What's New in 2.0.0
Apache Ambari - What's New in 2.0.0Hortonworks
 
Apache Accumulo 1.8.0 Overview
Apache Accumulo 1.8.0 OverviewApache Accumulo 1.8.0 Overview
Apache Accumulo 1.8.0 OverviewJosh Elser
 
Dataworks Berlin Summit 18' - Deep learning On YARN - Running Distributed Te...
Dataworks Berlin Summit 18' - Deep learning On YARN -  Running Distributed Te...Dataworks Berlin Summit 18' - Deep learning On YARN -  Running Distributed Te...
Dataworks Berlin Summit 18' - Deep learning On YARN - Running Distributed Te...Wangda Tan
 
Apache Ambari: Past, Present, Future
Apache Ambari: Past, Present, FutureApache Ambari: Past, Present, Future
Apache Ambari: Past, Present, FutureHortonworks
 
Ozone- Object store for Apache Hadoop
Ozone- Object store for Apache HadoopOzone- Object store for Apache Hadoop
Ozone- Object store for Apache HadoopHortonworks
 
Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0Hortonworks
 
Apache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL DatabaseApache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL DatabaseDataWorks Summit
 
R12 d49656 gc10-apps dba 08
R12 d49656 gc10-apps dba 08R12 d49656 gc10-apps dba 08
R12 d49656 gc10-apps dba 08zeesniper
 

La actualidad más candente (17)

SAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA MonitoringSAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA Monitoring
 
Notes leo kafka
Notes leo kafkaNotes leo kafka
Notes leo kafka
 
The Taverna 2 Platform
The Taverna 2 PlatformThe Taverna 2 Platform
The Taverna 2 Platform
 
S/4HANA Installation Quickstart Guide and Monitoring S/4HANA
S/4HANA Installation Quickstart Guide and Monitoring S/4HANAS/4HANA Installation Quickstart Guide and Monitoring S/4HANA
S/4HANA Installation Quickstart Guide and Monitoring S/4HANA
 
An evaluation of distributed datastores using AppScale Cloud Platform
An evaluation of distributed datastores using AppScale Cloud PlatformAn evaluation of distributed datastores using AppScale Cloud Platform
An evaluation of distributed datastores using AppScale Cloud Platform
 
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The UnionDataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
Dataworks Berlin Summit 18' - Apache hadoop YARN State Of The Union
 
"SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011- Łukas...
"SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011-  Łukas..."SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011-  Łukas...
"SharePoint 2010 a SQL Server" - Konferencja Time For SharePoint 2011- Łukas...
 
Effective Testing of Apache Accumulo Iterators
Effective Testing of Apache Accumulo IteratorsEffective Testing of Apache Accumulo Iterators
Effective Testing of Apache Accumulo Iterators
 
Mule ESB - Consuming RESTful WS with RAML Definition
Mule ESB - Consuming RESTful WS with RAML DefinitionMule ESB - Consuming RESTful WS with RAML Definition
Mule ESB - Consuming RESTful WS with RAML Definition
 
Apache Ambari - What's New in 2.0.0
Apache Ambari - What's New in 2.0.0Apache Ambari - What's New in 2.0.0
Apache Ambari - What's New in 2.0.0
 
Apache Accumulo 1.8.0 Overview
Apache Accumulo 1.8.0 OverviewApache Accumulo 1.8.0 Overview
Apache Accumulo 1.8.0 Overview
 
Dataworks Berlin Summit 18' - Deep learning On YARN - Running Distributed Te...
Dataworks Berlin Summit 18' - Deep learning On YARN -  Running Distributed Te...Dataworks Berlin Summit 18' - Deep learning On YARN -  Running Distributed Te...
Dataworks Berlin Summit 18' - Deep learning On YARN - Running Distributed Te...
 
Apache Ambari: Past, Present, Future
Apache Ambari: Past, Present, FutureApache Ambari: Past, Present, Future
Apache Ambari: Past, Present, Future
 
Ozone- Object store for Apache Hadoop
Ozone- Object store for Apache HadoopOzone- Object store for Apache Hadoop
Ozone- Object store for Apache Hadoop
 
Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0Apache Ambari - What's New in 1.7.0
Apache Ambari - What's New in 1.7.0
 
Apache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL DatabaseApache Phoenix: Transforming HBase into a SQL Database
Apache Phoenix: Transforming HBase into a SQL Database
 
R12 d49656 gc10-apps dba 08
R12 d49656 gc10-apps dba 08R12 d49656 gc10-apps dba 08
R12 d49656 gc10-apps dba 08
 

Destacado

Adobe Photoshop
Adobe PhotoshopAdobe Photoshop
Adobe PhotoshopLaRue
 
Kelly Clarkson
Kelly ClarksonKelly Clarkson
Kelly Clarksontanica
 
IAMAS 2010 First presentation
IAMAS 2010 First presentationIAMAS 2010 First presentation
IAMAS 2010 First presentationocrock
 
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...Lucidworks (Archived)
 
まっちゃ4451LT「IE の InPrivateブラウズ」
まっちゃ4451LT「IE の InPrivateブラウズ」まっちゃ4451LT「IE の InPrivateブラウズ」
まっちゃ4451LT「IE の InPrivateブラウズ」彰 村地
 
Network Forensics Puzzle Contest に挑戦 #2
Network Forensics Puzzle Contest に挑戦 #2Network Forensics Puzzle Contest に挑戦 #2
Network Forensics Puzzle Contest に挑戦 #2彰 村地
 
Chicago Solr Meetup - June 10th: Exploring Hadoop with Search
Chicago Solr Meetup - June 10th: Exploring Hadoop with SearchChicago Solr Meetup - June 10th: Exploring Hadoop with Search
Chicago Solr Meetup - June 10th: Exploring Hadoop with SearchLucidworks (Archived)
 
All the lovers
All the loversAll the lovers
All the loverstanica
 
情報科学演習 09
情報科学演習 09情報科学演習 09
情報科学演習 09libryukyu
 
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...Lucidworks (Archived)
 
Jazeed about Solr - People as A Search Problem
Jazeed about Solr - People as A Search ProblemJazeed about Solr - People as A Search Problem
Jazeed about Solr - People as A Search ProblemLucidworks (Archived)
 

Destacado (20)

Adobe Photoshop
Adobe PhotoshopAdobe Photoshop
Adobe Photoshop
 
Kelly Clarkson
Kelly ClarksonKelly Clarkson
Kelly Clarkson
 
IAMAS 2010 First presentation
IAMAS 2010 First presentationIAMAS 2010 First presentation
IAMAS 2010 First presentation
 
Lucene rev preso cisco gannu
Lucene rev preso cisco gannuLucene rev preso cisco gannu
Lucene rev preso cisco gannu
 
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
Exploration of multidimensional biomedical data in pub chem, Presented by Lia...
 
All Data Big and Small
All Data Big and SmallAll Data Big and Small
All Data Big and Small
 
What’s new in apache lucene 3.0
What’s new in apache lucene 3.0What’s new in apache lucene 3.0
What’s new in apache lucene 3.0
 
まっちゃ4451LT「IE の InPrivateブラウズ」
まっちゃ4451LT「IE の InPrivateブラウズ」まっちゃ4451LT「IE の InPrivateブラウズ」
まっちゃ4451LT「IE の InPrivateブラウズ」
 
Network Forensics Puzzle Contest に挑戦 #2
Network Forensics Puzzle Contest に挑戦 #2Network Forensics Puzzle Contest に挑戦 #2
Network Forensics Puzzle Contest に挑戦 #2
 
Solr lucene search revolution
Solr lucene search revolutionSolr lucene search revolution
Solr lucene search revolution
 
Crazy
CrazyCrazy
Crazy
 
Chicago Solr Meetup - June 10th: Exploring Hadoop with Search
Chicago Solr Meetup - June 10th: Exploring Hadoop with SearchChicago Solr Meetup - June 10th: Exploring Hadoop with Search
Chicago Solr Meetup - June 10th: Exploring Hadoop with Search
 
Customized Navigation Using SOLR
Customized Navigation Using SOLRCustomized Navigation Using SOLR
Customized Navigation Using SOLR
 
All the lovers
All the loversAll the lovers
All the lovers
 
情報科学演習 09
情報科学演習 09情報科学演習 09
情報科学演習 09
 
Mains aux fleurs
Mains aux fleursMains aux fleurs
Mains aux fleurs
 
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
Downtown SF Lucene/Solr Meetup - September 17: Thoth: Real-time Solr Monitori...
 
Jazeed about Solr - People as A Search Problem
Jazeed about Solr - People as A Search ProblemJazeed about Solr - People as A Search Problem
Jazeed about Solr - People as A Search Problem
 
Linked In Introduction
Linked In IntroductionLinked In Introduction
Linked In Introduction
 
Solr & Lucene at Etsy
Solr & Lucene at EtsySolr & Lucene at Etsy
Solr & Lucene at Etsy
 

Similar a What’s New in Apache Lucene 2.9

How to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/SolrHow to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/Solrlucenerevolution
 
How to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/SolrHow to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/Solrlucenerevolution
 
Openstack starter-guide-diablo
Openstack starter-guide-diabloOpenstack starter-guide-diablo
Openstack starter-guide-diablobabycat_feifei
 
Openstack starter-guide-diablo
Openstack starter-guide-diabloOpenstack starter-guide-diablo
Openstack starter-guide-diablo锐 张
 
Streaming the platform with Confluent (Apache Kafka)
Streaming the platform with Confluent (Apache Kafka)Streaming the platform with Confluent (Apache Kafka)
Streaming the platform with Confluent (Apache Kafka)GiuseppeBaccini
 
Programming the Network Data Plane
Programming the Network Data PlaneProgramming the Network Data Plane
Programming the Network Data PlaneC4Media
 
Mule soft meetup_chandigarh_#7_25_sept_2021
Mule soft meetup_chandigarh_#7_25_sept_2021Mule soft meetup_chandigarh_#7_25_sept_2021
Mule soft meetup_chandigarh_#7_25_sept_2021Lalit Panwar
 
Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...
Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...
Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...Real Estate
 
Search Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSearch Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSease
 
Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentAxel Fontaine
 
Why software performance reduces with time?.pdf
Why software performance reduces with time?.pdfWhy software performance reduces with time?.pdf
Why software performance reduces with time?.pdfMike Brown
 
Webinar: Fusion 2.3 Preview - Enhanced Features with Solr & Spark
Webinar: Fusion 2.3 Preview - Enhanced Features with Solr & SparkWebinar: Fusion 2.3 Preview - Enhanced Features with Solr & Spark
Webinar: Fusion 2.3 Preview - Enhanced Features with Solr & SparkLucidworks
 

Similar a What’s New in Apache Lucene 2.9 (20)

What’s New in Apache Lucene 3.0
What’s New in Apache Lucene 3.0What’s New in Apache Lucene 3.0
What’s New in Apache Lucene 3.0
 
What’s New in Apache Lucene 3.0
What’s New in Apache Lucene 3.0What’s New in Apache Lucene 3.0
What’s New in Apache Lucene 3.0
 
What’s New in Solr 1.4
What’s New in Solr 1.4What’s New in Solr 1.4
What’s New in Solr 1.4
 
Overview of Searching in Solr 1.4
Overview of Searching in Solr 1.4Overview of Searching in Solr 1.4
Overview of Searching in Solr 1.4
 
What’s new in apache solr 1.4
What’s new in apache solr 1.4What’s new in apache solr 1.4
What’s new in apache solr 1.4
 
How to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/SolrHow to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/Solr
 
How to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/SolrHow to Gain Greater Business Intelligence from Lucene/Solr
How to Gain Greater Business Intelligence from Lucene/Solr
 
java new technology
java new technologyjava new technology
java new technology
 
Openstack starter-guide-diablo
Openstack starter-guide-diabloOpenstack starter-guide-diablo
Openstack starter-guide-diablo
 
Openstack starter-guide-diablo
Openstack starter-guide-diabloOpenstack starter-guide-diablo
Openstack starter-guide-diablo
 
Streaming the platform with Confluent (Apache Kafka)
Streaming the platform with Confluent (Apache Kafka)Streaming the platform with Confluent (Apache Kafka)
Streaming the platform with Confluent (Apache Kafka)
 
Programming the Network Data Plane
Programming the Network Data PlaneProgramming the Network Data Plane
Programming the Network Data Plane
 
Mule soft meetup_chandigarh_#7_25_sept_2021
Mule soft meetup_chandigarh_#7_25_sept_2021Mule soft meetup_chandigarh_#7_25_sept_2021
Mule soft meetup_chandigarh_#7_25_sept_2021
 
Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...
Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...
Top Alternatives To CentOS Linux Server Distributions For Programmers – 2022 ...
 
Search Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer PerspectiveSearch Quality Evaluation: a Developer Perspective
Search Quality Evaluation: a Developer Perspective
 
Quantum API 1.1 proposal
Quantum API 1.1 proposalQuantum API 1.1 proposal
Quantum API 1.1 proposal
 
Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App Deployment
 
Kafka Explainaton
Kafka ExplainatonKafka Explainaton
Kafka Explainaton
 
Why software performance reduces with time?.pdf
Why software performance reduces with time?.pdfWhy software performance reduces with time?.pdf
Why software performance reduces with time?.pdf
 
Webinar: Fusion 2.3 Preview - Enhanced Features with Solr & Spark
Webinar: Fusion 2.3 Preview - Enhanced Features with Solr & SparkWebinar: Fusion 2.3 Preview - Enhanced Features with Solr & Spark
Webinar: Fusion 2.3 Preview - Enhanced Features with Solr & Spark
 

Más de Lucidworks (Archived)

SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
 SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
SFBay Area Solr Meetup - July 15th: Integrating Hadoop and SolrLucidworks (Archived)
 
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for BusinessSFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for BusinessLucidworks (Archived)
 
SFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
SFBay Area Solr Meetup - June 18th: Benchmarking Solr PerformanceSFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
SFBay Area Solr Meetup - June 18th: Benchmarking Solr PerformanceLucidworks (Archived)
 
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search EngineChicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search EngineLucidworks (Archived)
 
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache SolrMinneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache SolrLucidworks (Archived)
 
Minneapolis Solr Meetup - May 28, 2014: Target.com Search
Minneapolis Solr Meetup - May 28, 2014: Target.com SearchMinneapolis Solr Meetup - May 28, 2014: Target.com Search
Minneapolis Solr Meetup - May 28, 2014: Target.com SearchLucidworks (Archived)
 
Unstructured Or: How I Learned to Stop Worrying and Love the xml, Presented...
Unstructured   Or: How I Learned to Stop Worrying and Love the xml, Presented...Unstructured   Or: How I Learned to Stop Worrying and Love the xml, Presented...
Unstructured Or: How I Learned to Stop Worrying and Love the xml, Presented...Lucidworks (Archived)
 
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...Lucidworks (Archived)
 
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DC
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DCBig Data Challenges, Presented by Wes Caldwell at SolrExchage DC
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DCLucidworks (Archived)
 
What's New in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
What's New  in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DCWhat's New  in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
What's New in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DCLucidworks (Archived)
 
Solr At AOL, Presented by Sean Timm at SolrExchage DC
Solr At AOL, Presented by Sean Timm at SolrExchage DCSolr At AOL, Presented by Sean Timm at SolrExchage DC
Solr At AOL, Presented by Sean Timm at SolrExchage DCLucidworks (Archived)
 
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DCIntro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DCLucidworks (Archived)
 
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DCTest Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DCLucidworks (Archived)
 
Building a data driven search application with LucidWorks SiLK
Building a data driven search application with LucidWorks SiLKBuilding a data driven search application with LucidWorks SiLK
Building a data driven search application with LucidWorks SiLKLucidworks (Archived)
 
Introducing LucidWorks App for Splunk Enterprise webinar
Introducing LucidWorks App for Splunk Enterprise webinarIntroducing LucidWorks App for Splunk Enterprise webinar
Introducing LucidWorks App for Splunk Enterprise webinarLucidworks (Archived)
 
Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks
Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks
Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks Lucidworks (Archived)
 

Más de Lucidworks (Archived) (20)

Integrating Hadoop & Solr
Integrating Hadoop & SolrIntegrating Hadoop & Solr
Integrating Hadoop & Solr
 
The Data-Driven Paradigm
The Data-Driven ParadigmThe Data-Driven Paradigm
The Data-Driven Paradigm
 
SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
 SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
SFBay Area Solr Meetup - July 15th: Integrating Hadoop and Solr
 
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for BusinessSFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
SFBay Area Solr Meetup - June 18th: Box + Solr = Content Search for Business
 
SFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
SFBay Area Solr Meetup - June 18th: Benchmarking Solr PerformanceSFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
SFBay Area Solr Meetup - June 18th: Benchmarking Solr Performance
 
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search EngineChicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
Chicago Solr Meetup - June 10th: This Ain't Your Parents' Search Engine
 
What's new in solr june 2014
What's new in solr june 2014What's new in solr june 2014
What's new in solr june 2014
 
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache SolrMinneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
Minneapolis Solr Meetup - May 28, 2014: eCommerce Search with Apache Solr
 
Minneapolis Solr Meetup - May 28, 2014: Target.com Search
Minneapolis Solr Meetup - May 28, 2014: Target.com SearchMinneapolis Solr Meetup - May 28, 2014: Target.com Search
Minneapolis Solr Meetup - May 28, 2014: Target.com Search
 
Unstructured Or: How I Learned to Stop Worrying and Love the xml, Presented...
Unstructured   Or: How I Learned to Stop Worrying and Love the xml, Presented...Unstructured   Or: How I Learned to Stop Worrying and Love the xml, Presented...
Unstructured Or: How I Learned to Stop Worrying and Love the xml, Presented...
 
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
Building a Lightweight Discovery Interface for Chinese Patents, Presented by ...
 
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DC
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DCBig Data Challenges, Presented by Wes Caldwell at SolrExchage DC
Big Data Challenges, Presented by Wes Caldwell at SolrExchage DC
 
What's New in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
What's New  in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DCWhat's New  in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
What's New in Lucene/Solr Presented by Grant Ingersoll at SolrExchage DC
 
Solr At AOL, Presented by Sean Timm at SolrExchage DC
Solr At AOL, Presented by Sean Timm at SolrExchage DCSolr At AOL, Presented by Sean Timm at SolrExchage DC
Solr At AOL, Presented by Sean Timm at SolrExchage DC
 
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DCIntro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
Intro to Solr Cloud, Presented by Tim Potter at SolrExchage DC
 
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DCTest Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
Test Driven Relevancy, Presented by Doug Turnbull at SolrExchage DC
 
Building a data driven search application with LucidWorks SiLK
Building a data driven search application with LucidWorks SiLKBuilding a data driven search application with LucidWorks SiLK
Building a data driven search application with LucidWorks SiLK
 
Introducing LucidWorks App for Splunk Enterprise webinar
Introducing LucidWorks App for Splunk Enterprise webinarIntroducing LucidWorks App for Splunk Enterprise webinar
Introducing LucidWorks App for Splunk Enterprise webinar
 
Solr4 nosql search_server_2013
Solr4 nosql search_server_2013Solr4 nosql search_server_2013
Solr4 nosql search_server_2013
 
Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks
Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks
Lucene/Solr Revolution 2013: Paul Doscher Opening Remarks
 

Último

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 

Último (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 

What’s New in Apache Lucene 2.9

  • 1. What’s New in Apache Lucene 2.9 A Lucid Imagination Technical White Paper
  • 2. Abstract Apache Lucene is a high-performance, cross-platform, full-featured Information Retrieval library in open source, suitable for nearly every application that requires full-text search features. Since its introduction nearly 10 years ago, Apache Lucene has become a competitive player for developing extensible, high-performance full-text search solutions. The experience accumulated over time by the community of Lucene committers and contributors and the innovations they have engineered have delivered significant ongoing advances in Lucene’s capabilities. This white paper describes the new features and improvements in the latest version, Apache Lucene 2.9. It is intended mainly for programmers familiar with the broad base of Lucene’s capabilities, though those new to Lucene should also find it a useful exploration of the newest features. In the simplest terms, Lucene is now faster and more flexible than before. Historic weak points have been improved to open the way for innovative new features like near-real-time search, flexible indexing, and high-performance numerical range queries. Many new features have been added, new APIs introduced, and critical bugs have been fixed—all with the same goal: improving Lucene’s state-of-the-art search capabilities. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page ii
  • 3. Table of Contents Introduction ............................................................................................................................................................ 1 Core Features and Improvements .................................................................................................................. 3 Numeric Capabilities and Numeric Range Queries .............................................................................. 3 New TokenStream API .................................................................................................................................... 7 Per-Segment Search ...................................................................................................................................... 11 Near Realtime Search (NRS) ...................................................................................................................... 12 MultiTermQuery-Related Improvements ............................................................................................. 13 Payloads ............................................................................................................................................................. 14 Additions to Lucene Contrib .......................................................................................................................... 16 New Contrib Analyzers ................................................................................................................................ 16 Lucene Spatial (formerly known as LocalLucene) ............................................................................ 16 Lucene Remote and Java RMI .................................................................................................................... 18 New Flexible QueryParser .......................................................................................................................... 18 Minor Changes and Improvements in Lucene 2.9 ............................................................................. 19 Strategies for Upgrading to Lucene 2.9 ..................................................................................................... 21 Upgrade to 2.9—Recommended Actions .............................................................................................. 21 Upgrade to 2.9—Optional Actions ........................................................................................................... 22 References ............................................................................................................................................................ 23 Next Steps ............................................................................................................................................................. 24 APPENDIX: Choosing Lucene or Solr .......................................................................................................... 25 What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page iii
  • 4. Introduction Apache Lucene is a high-performance, cross-platform, full-featured Information Retrieval library, in open source, suitable for nearly every application that requires full-text search features. Lucene currently ranks among the top 15 open source projects and is one of the top 5 Apache projects, with installations at over 4,000 companies. Downloads of Lucene, and its server implementation Solr, have grown nearly tenfold over the past three years; Solr is the fastest-growing Lucene subproject. Lucene and Solr offer an attractive alternative to proprietary licensed search and discovery software vendors.1 With the release of version 2.9 in September 2009, the Apache Lucene community delivered the latest upgrade of Lucene. This white paper aims to address key issues for you if you have an Apache Lucene-based application, and need to upgrade existing code to work well with this latest version, so that you may take advantage of the various improvements and prepare for the next major release. If you do not have a Lucene application, the paper should also give you a good overview of the innovations in this release. Unlike the previous 2.4.1 release (March 2009), Lucene 2.9 is more than just a bug-fix release. It introduces multiple performance improvements, new features, better runtime behavior, API changes, and bug-fixes at a variety of levels. The 2.9 release improves Lucene in several key aspects, which make it an even more compelling alternative to other solutions. Most notably: • Improvements for Near-Realtime Search capabilities make documents searchable almost instantaneously. • A new, straightforward API for handling Numeric Ranges both simplifies development and virtually wipes out performance overhead. • Analysis API has been replaced for more streamlined, flexible text handling. 1 See the Appendix for a discussion of when to choose Lucene or Solr. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 1
  • 5. And, behind the scenes, the groundwork has been laid for yet more indexing flexibility in future releases. Lucene Contrib also adds new utility packages, introduced with this release: • An extremely flexible query parser framework opens new possibilities for programmers to more easily create their own query parsing syntax. • Local-Lucene and its geo-search capabilities, now donated to Apache, provide this near-mandatory functionality for state-of-the-art search. • Various contributions have markedly improved support for languages like Arabic, Persian, and Chinese. Some important notes on compatibility: because previous minor releases also contained performance improvements and bug fixes, programmers have been accustomed to upgrading to a new Lucene version just by replacing the JAR file in their classpath. And, in those past cases, Lucene-based apps could be upgraded flawlessly without recompiling the software components accessing or extending Apache Lucene. However, this may not be so with Lucene 2.9. Lucene 2.9 introduces several back-compatibility-breaking changes that may well require changes in your code that uses the library. A drop-in library replacement is not guaranteed to be successful; at a minimum, it is not likely to be flawless. As a result, we recommend that if you are upgrading from a previous Lucene release, you should at least recompile any software components directly accessing or extending the library. In the latter case, recompilation alone will most likely not be sufficient. More details on these dependencies are discussed in the “Upgrading Lucene” section of the paper. We’ve also noted any significant compatibility issues with this label: [BACK-COMPATIBILITY]. Finally, it is important to note that Lucene 2.9 will be the last release supporting the Java 1.4 platform. While the majority of programmers are already running on either version 1.5 or 1.6 platforms (1.6 is our recommended JVM), Java 1.4 reached its end of service life in October 2008. This document is not intended to be a comprehensive overview of Lucene 2.9 in all its functions, but rather the new key features and capabilities. Always check the Lucid Imagination Certified distribution and the official Lucene Website (http://lucene.apache.org) for the most up-to-date release information. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 2
  • 6. Core Features and Improvements Numeric Capabilities and Numeric Range Queries One of Apache Lucene's basic properties is its representation of internal searchable values (terms) as UTF-8 encoded characters. Every value passed to Lucene must be converted into a string in order to be searchable. At the same time, Lucene is frequently applied to search numeric values and ranges, such as prices, dates, or other numeric field attributes. Historically, searching over numeric ranges has been a weak point of the library. However, the 2.9 release comes with a tremendous improvement for searching numeric values, especially for range queries. Prior to Lucene 2.9, numeric values were encoded with leading zeros, essentially as a full- precision value. Values stored with full precision ended up creating many unique terms in the index. Thus, if you needed to retrieve all documents in a certain range (e.g., from $1.50 to $1500.0) Lucene had to iterate through a lot of terms whenever many documents with unique values were indexed. Consequently, execution of queries with large ranges and lots of unique terms could be extremely slow as a result of this overhead. Many workaround techniques have evolved over the years to improve the performance of ranges, such as encoding date ranges in multiple fields with separate fields for year, month, and day. But at the end of the day, every programmer had to roll his or her own way of searching ranges efficiently. In Lucene 2.9, NumericUtils and its relatives (NumericRangeQuery / NumericRangeFilter) introduce native numeric encoding and search capabilities. Numeric Java primitives (long, int, float, and double) are transformed into prefix- encoded representations with increasing precision. Internally each prefix precision is generated by stripping off the least significant bits indicated by the precisionStep. Each value is subsequently converted to a sequence of 7-bit ASCII characters (due to the UTF-8 term encoding in the index, 8 or more bits would split into two or more bytes) resulting in a predictable number of prefix-terms that can be calculated ahead of time. The figure below illustrates such a Prefix Tree. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 3
  • 7. Example of a Prefix Tree, where the leaves of the tree hold the actual term values and all the descendants of a node have a common prefix associated with the node. Bold circles mark all relevant nodes to retrieve a range from 215 to 977. The generated terms are indexed just like any other string values passed to Lucene. Under the hood, Lucene associates distinct terms with all documents containing the term, so that all documents containing a numeric value with the same prefix are “grouped” together, meaning the number of terms that need to be searched is reduced tremendously. This stands in contrast to the relatively less efficient encoding scheme in previous releases, where each unique numeric value was indexed as a distinct term based on the number of terms in the index. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 4
  • 8. Directory directory = new RAMDirectory(); Analyzer analyzer = new WhitespaceAnalyzer(); IndexWriter writer = new IndexWriter(directory, analyzer, IndexWriter.MaxFieldLength.UNLIMITED); for (int i = 0; i < 20000; i++) { Document doc = new Document(); doc.add(new Field("id", String.valueOf(i), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS)); String num = Integer.toString(i); String paddedValue = "00000".substring(0, 5 - num.length()) + num; doc.add(new Field("oldNumeric", paddedValue, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS)); writer.addDocument(doc); } writer.close(); Indexing a zero-padded numeric value for use with an ordinary RangeQuery. You can also use the native encoding of numeric values beyond range searches. Numeric fields can be loaded in the internal FieldCache, where they are used for sorting. Zero- padding of numeric primitives (see code example above) is no longer needed as the trie- encoding guarantees the correct ordering without requiring execution overhead or extra coding. The code listing below instead uses the new NumericField to index a numeric Java primitive using 4-bit precision. Like the straightforward NumericField, querying numeric ranges also provides a type-safe API. NumericRangeQuery instances are created using one of the provided static constructors for the corresponding Java primitive. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 5
  • 9. Directory directory = new RAMDirectory(); Analyzer analyzer = new WhitespaceAnalyzer(); IndexWriter writer = new IndexWriter(directory, analyzer, IndexWriter.MaxFieldLength.UNLIMITED); for (int i = 0; i < 20000; i++) { Document doc = new Document(); doc.add(new Field("id", String.valueOf(i), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS)); doc.add(new NumericField("newNumeric", 4, Field.Store.YES, true).setIntValue(i)); writer.addDocument(doc); } writer.close(); Indexing numeric values with the new NumericField type The example below shows a numeric range query using an int primitive with the same precision used in the indexing example. If different precision values are used at index or search time, numeric queries can yield unexpected behavior. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 6
  • 10. IndexSearcher searcher = new IndexSearcher(directory, true); Query query = NumericRangeQuery.newIntRange("newNumeric", 4, 10, 10000, true, false); TopDocs docs = searcher.search(query, null, 10); assertNotNull("Docs is null", docs); assertEquals(9990, docs.totalHits); for (int i = 0; i < docs.scoreDocs.length; i++) { ScoreDocs d= docs.scoreDocs[i]; assertTrue(sd.doc >= 10 && sd.doc < 10000); } Searching numeric values with the new NumericRangeQuery Improvements resulting from new Lucene numeric capabilities are equally significant in versatility and performance. Now, Lucene can cover almost every use-case related to numeric values. Moreover, range searches or sorting on float or double values up to fast date searches (dates converted to time stamps) will execute in less than 100 milliseconds in most cases. By comparison, the old approach using padded full-precision values could take up to 30 seconds or more depending on the underlying index. New TokenStream API Almost every programmer who has extended Lucene has worked with its analysis function. Text analysis is common to almost every use-case, and is among the best known Lucene APIs. Since its early days, Lucene has used a “Decorator Pattern” to provide a pluggable and flexible analysis API, allowing a combination of existing and customized analysis implementations. The central analysis class TokenStream enumerates a sequence of tokens from either a document's fields or from a query. Commonly, multiple TokenStream instances are chained, each applying a separate analysis step to text terms represented by a Token class that encodes all relevant information about a term. Prior to Lucene 2.9, TokenStream operated exclusively on Token instances transporting term information through the analysis chain. With this release, the token-based API has been marked as deprecated. It is completely replaced by an attribute-based API. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 7
  • 11. Here’s how it has changed. Rather than receiving a Token instance from one of the two TokenStream.next() methods, the new API follows a stateful approach instead. To advance in the stream, consumers call TokenStream.incrementToken(), which returns a Boolean result indicating if the end of the stream has been reached. Information gathered during the analysis process is encoded in attributes accessible via the new TokenStream base class AttributeSource. In contrast to the older Token class, the Attribute-based approach separates specific term characteristics from others not necessarily related. Each TokenStream adds the attributes it is specifically targeting at construction time (see code listing below) and keeps a reference to it throughout its lifetime. This provides type-safe access to all attributes relevant for a particular TokenStream instance. protected CharReplacementTokenStream(TokenStream input) { super(input); termAtt = (TermAttribute) addAttribute(TermAttribute.class); } Adding a TermAttribute at construction time Inside TokenStream.incrementToken(), a token stream only operates on attributes that have been declared in the constructor. For instance, if you have Lucene replacing a character like a German umlaut in a term, only the TermAttribute (declared at construction time in the code listing above) is used. (Other attributes like PositionIncrementAttribute or PayloadAttribute are ignored by this TokenStream as they might not be needed in this particular use-case.) What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 8
  • 12. public boolean incrementToken() throws IOException { if (input.incrementToken()) { final char[] termBuffer = termAtt.termBuffer(); final int termLength = termAtt.termLength(); if (replaceChar(termBuffer, termLength)) { termAtt.setTermBuffer(output, 0, outputPos); } return true; } return false; } Replacing characters using the new attribute based API. What the above example does not demonstrate is the full power of the new token API. There, we replaced one or more characters in the token and discarded the original one. Yet, in many use-cases, the original token should be preserved in addition to the modified one. Using the old API required a fair bit of work and logic to handle such a common use-case. In contrast, the new attribute-based approach allows capture and restoration of the state of attributes, which makes such use-cases almost trivial. The example below shows a version of the previous example improved for Lucene 2.9, in which the original term attribute is restored once the stream is advanced. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 9
  • 13. public boolean incrementToken() throws IOException { if (state != null) { restoreState(state); state = null; return true; } if (input.incrementToken()) { final char[] termBuffer = termAtt.termBuffer(); final int termLength = termAtt.termLength(); if (replaceChar(termBuffer, termLength)) { state = captureState(); termAtt.setTermBuffer(output, 0, outputPos); } return true; } return false; } Replacing characters and additionally emitting the original term text using the new Attribute based API (position increments are omitted). The separation of attributes makes it possible to add arbitrary properties to the analysis chain without using a customized Token class. Attributes are then made type-safely accessible by all subsequent TokenStream instances, and can eventually be used by the consumer. This way, you get a generic way to add various kind of custom information, such as part-of-speech tags, payloads, or average document length to the token stream. Unfortunately, Lucene 2.9 doesn't yet provide functionality to persist custom Attribute implementation to the underlying index. This improvement, part of what is often referred to as "flexible indexing," is under active development and is proposed for one of the upcoming Lucene releases. Beyond the generalizability of this API, one of its most significant improvements is its effective reuse of Attribute instances across multiple iterations of analysis. Attribute What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 10
  • 14. implementations are created during TokenStream instantiation and are reused each time the stream advances to a successive increment. Even if a stream is used for another analysis, the same Attribute instances may be used, provided the stream is reusable. This greatly reduces the rate of object creation, streamlining execution and minimizing any required garbage collection. While the new API provides full back-compatibility, it is strongly recommended to update any existing custom TokenStream implementations to exclusively use incrementToken instead of one of the overhead-heavy next() methods. If you are trying to update your custom TokenStream or one of its subclass (TokenFilter and Tokenizer) implementations, it is recommended that you use the abstract BaseTokenStreamTestCase class, which provides various utility functions for testing against the new and old API. The test case is freely available for download in the source distribution of Apache Lucene 2.9. Per-Segment Search Since the early days of Apache Lucene, documents have been stored at the lowest level in a segment—a small but entirely independent index. On the highest abstraction level, Lucene combines segments into one large index and executes searches across all visible segments. As more and more documents are added to an index, Lucene buffers your documents in RAM and flushes them to disk periodically. Depending on a variety of factors, Lucene either incrementally adds documents to an existing segment, or creates entirely new segments. To reduce the negative impact of an increasing number of segments on search performance, Lucene tries to combine/merge multiple segments into larger ones. For optimal search performance, Lucene can optimize an index that essentially merges all existing segments into a single segment. Prior to Lucene 2.9, search logic resided at the highest abstraction level, accessing a single IndexReader no matter how many segments the index was composed of. Similarly the FieldCache was associated with the top-level IndexReader, and then had to be invalidated each time an index was reopened. With Lucene 2.9, the search logic and the FieldCache have moved to a per-segment level. While this has introduced a little more internal complexity, the benefit of the tradeoff is a new per-segment index behavior that yields a rich variety of performance improvements for unoptimized indexes. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 11
  • 15. In most applications, existing segments rarely change internally, and this property had not been effectively utilized in previous versions of Lucene. IndexReader.reopen(), first added in Lucene 2.4, now has the ability to add new or changed segments to an already existing top-level IndexReader instead of reloading all existing segments. The FieldCache also takes advantage of rarely changing segments. Cache instances of unchanged or updated segments can remain in memory or need only be rebuilt instead of invalidating the FieldCache entirely. Depending on the number of changed index segments, this can heavily reduce I/O as well as garbage collection costs, compared to reopening the entire index. Previous versions of Lucene also suffered from long warming time for sorting and function queries. Those use-cases have been improved as the warm-up of reopened searchers is now much faster. It's worth mentioning that Per-Segment Search doesn't yield improvements in all situations. If an IndexReader is opened on an optimized index, all pre-existing segments are merged into a single one, which then loads in its entirety. In other situations, perhaps more common, where some changes have been committed to the index and a new IndexReader instance is obtained by calling IndexReader.reopen() on a previously opened reader, the new per-segment capabilities can dramatically speed up reopening. But in this case, opening a new IndexReader using one of the overloaded static IndexReader.open() methods will create an entirely new reader instance and therefore can't take advantage of any per-segment capabilities. Near Realtime Search (NRS) More and more, Lucene programmers are pursuing real-time or near real-time requirements with their search applications. Previous Lucene versions did a decent job with the incremental changes characteristic of this scenario, capturing those changes and making them available for searching. Lucene 2.9 adds significant new capabilities for addressing the requirements of high-change document environments. First of all, the IndexWriter – in general responsible for modifying the underlying index and flushing documents to disk – —now offers a way to obtain an IndexReader instance directly from the writer. The newly obtained reader then not only reflects the documents already flushed to disk, but also makes all uncommitted documents still residing in memory almost instantly searchable. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 12
  • 16. The reader instance returned by IndexWriter.getReader() supports reopening the reader as long as the writer releasing the reader has not been committed. Once it is committed, re-opening the reader will result in an AlreadyClosedExecption. It is important to understand why this feature is referred to as “near real-time” rather than “real-time.” When IndexWriter.getReader() is called for the very first time, Lucene needs to consume a reasonable amount of additional resources (i.e., RAM, CPU-cycles, and file descriptors) to make uncommitted documents searchable. Due to this additional work, uncommitted documents will not always be available instantaneously. Nonetheless, in most cases, the performance gained with this feature will be better than just reopening the index, or the traditional simpler approach of opening a brand new reader instance. To keep the latency as low as possible, the IndexWriter offers an optional “pre-warmup” functionality, by which newly merged segments can be prepared for real-time search. If you are new to this feature, you should be aware that the pre-warmup API is still marked experimental and might change in future releases. MultiTermQuery-Related Improvements In Lucene 2.4, many standard queries, such as FuzzyQuery, WildcardQuery, and PrefixQuery were re-factored and subclassed under MultiTermQuery. Lucene 2.9 adds some improvements under the hood, resulting into much better performance for those queries. [BACK- COMPATIBILITY] 2 In Lucene 2.9, multi-term queries now use a constant score internally, based on the assumption that most programmers don't care about the interim score of the queries resulting from the term expansion that takes place during query rewriting. 2 This could be a back-compatibility issue if one of those classes has been subclassed. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 13
  • 17. Although constant-scoring is now the default behavior, the older scoring mode is still available for multiterm queries in 2.9. Beyond that, you can choose one of the following scoring modes: Filtered constant score: rewrites the multiterm query into a ConstantScoreQuery in combination with a filter to match all relevant documents. BooleanQuery constant score: rewrites the multiterm query into a ConstantScoreQuery based on a BooleanQuery by translating each term into an optional Boolean clause. This mode still has a limitation of maxClauseCount and might raise an exception if the query has too many Boolean clauses. Conventional scoring (not recommended): rewrites the multiterm query into an ordinary BooleanQuery. Automatic constant score (default): tries to choose the best constant score mode (Filter or BooleanQuery) based on term and document counts from the query. If the number of terms and documents is small enough, BooleanQuery is chosen, otherwise the query rewrites to a filter-backed ConstantScoreQuery. You can change the scoring mode by passing an implementation of RewriteMethod to MultiTermQuery.setRewriteMethod() as shown in the code example below. PrefixQuery prefixQuery = new PrefixQuery(new Term("aField", "luc")); prefixQuery.setRewriteMethod( MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE); Explicitly setting a filtered constant-score RewriteMethod on a PrefixQuery Payloads The Payloads feature, though originally added in a previous version of Lucene, remains pretty new to most programmers. A payload is essentially a byte array that is associated with a particular term in the index. Payloads can be associated with a single term during text analysis and subsequently committed directly to the index. On the search side, these byte arrays are accessible to influence the scoring for a particular term, or even to filter entire documents. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 14
  • 18. For instance, if your Lucene application is analyzing the phrase “Gangs of New York”, payloads can encode information about the terms “New” and “York” together, so that they are treated as a paired term for the name of a city, or can specify that “Gangs” is a noun rather than a verb. Prior to 2.9, payloads were exposed via a query called BoostingTermQuery, which has now been renamed to PayloadTermQuery. By using this query type, you can query Lucene to find all occurrences where “New” is a part of a city name like “New York” or “New Orleans”. In comparison with previous versions, Lucene 2.9 also provides more control and flexibility for payload scoring. You can pass a custom PayloadFunction to the constructor of a payload-aware query. Each payload is fed back to the custom function, which calculates the score based on the cumulative outcomes of payload occurrences. This improvement becomes even more useful when payloads are used in combination with span queries. Spans represent a range of term positions in a document, whereas in turn, payloads can help scoring based on the distance between terms. For instance, using a PayloadNearQuery , documents can be scored differently if terms are in the same sentence or paragraph if that information is encoded in the payload. At a higher abstraction level, another payload aware TokenFilter has been added. DelimitedPayloadTokenFilter splits tokens separated by a predefined character delimiter, where the first part of the token is the token itself and the second part after the delimiter represents the payload. For example, it can parse an e-mail address, for example carol.smith@apache.org, by making “carol.smith” the token, and creating a payload to represent the domain name, “apache.org”. A customizable payload-encoder takes care of encoding the values while everything else magically happens inside the filter. Besides being a convenient way to add payloads to existing search functionality, this class also serves as a working example of how to use payloads during the analysis process3. 3 See http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/ for more information. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 15
  • 19. Additions to Lucene Contrib So far, we’ve reviewed key new features and improvements introduced in the Apache Lucene core API. This section outlines the major additions and improvements to Lucene Contrib packages. Contrib packages are parts of Lucene which do not necessarily belong to the API core but are often helpful in building Lucene applications. New Contrib Analyzers The Analysis package in Lucene Contrib has always been a valuable source for almost every Lucene programmer. The latest release brings several noteworthy improvements especially in terms of language support. • Better support for Chinese: Chinese, like many Asian languages, does not use white spaces to delimit one word from another, nor is punctuation used at all. Smart-CN provides an analyzer with improved tokenization and capabilities in splitting individual characters. While Smart-CN is part of the analyzers contrib module, it is distributed in its own JAR file because of the large (6MB) file resources it depends on. • “Light10”-based Arabic analysis: a new Analyzer based on a high-performance stemming algorithm (Light10) applying lightweight prefix and suffix removal to Arabic text. • Persian Analyzer: applying character normalization and Persian stopword removal to Persian-only or mixed language text. • Reverse String filter, as in leading wildcards: to support a search feature like leading wildcards efficiently, one of the common tricks/approaches is to index terms in reverse order. A leading wildcard effectively becomes a trailing wildcard if searched against a field with reversed tokens. Lucene Spatial (formerly known as LocalLucene) Geospatial search has become a very common use-case, especially with the advent of mobile devices. Almost every new mobile platform supports a “nearby” search feature. End users seeking data on something near their current location (restaurants, movie theatres, What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 16
  • 20. plumbers, etc.) expect both that results are limited to within a certain range, and that results can be ranked by distance from the end user’s location. In early 2009, an open source project formerly known as LocalLucene was donated to Apache Lucene and integrated as a contrib package. Lucene Spatial extends Lucene capabilities with support for geographical and location-based search. While Lucene Spatial doesn't have any distance scoring capabilities, it can effectively help to filter and sort based on geographical information like longitude and latitude values. Filtering is an especially common use-case, when combined with a full-text query. In searching for “French restaurant” within 5 miles from a specific location, the filter restricts down the search space to documents with location fields within 5 miles; the rest of the search operation is implemented in core Lucene. Lucene Spatial has a couple of different ways to encode geographic information: GeoHash: a hierarchical spatial data structure that subdivides space into buckets in a grid shape. GeoHash takes the even bits from the longitude value while the odd bits are taken from the latitude value. The result is an arbitrary precision base 32-encoded string that offers the property of gradually removing characters from the end of the string to reduce the size and precision of the code. Nearby places are likely to have similar prefixes due to this property. Cartesian Tiers: projects the world on a flat surface. Overlays to this projection are created as grids (Cartesian Tiers), with each tier having an increasing number (always by a power of two) of grid boxes on it dividing up the projection. Location data can be placed within one of the grid boxes with different precision depending on the number of grid boxes on the tier. Both of the above allow efficient storage of geo-information in a Lucene index. In contrast to plain latitude and longitude values indexed in separate fields, GeoHash and Cartesian Tiers encode in a single field. Note that despite its previous releases under a different name (LocalLucene), the Lucene Spatial API still isn't considered stable and might change in future releases. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 17
  • 21. Lucene Remote and Java RMI The historic dependency on Java RMI from the Lucene core has now been removed: Lucene Remote is now partitioned into an optional contrib package. While the package itself doesn't add any functionality to Lucene it introduces a critical back-compatibility issue likely to be relevant for many programmers. In prior versions, the core-interface Searchable extended java.rmi.Remote to enable searches on remote indexes. If you had taken advantage of this convenience, you will now have to add the new Lucene-remote JAR file to the classpath and change their code to use the new remote base interface RMIRemoteSearchable as shown below. final RMIRemoteSearchable remoteObject = ...; final String remoteObjectName = ...; Naming.rebind (remoteObjectName, remoteObject); Searchable searchable = (Searchable)Naming.lookup(remoteObjectName); Using RemoteSearchable with Lucene 2.9 New Flexible QueryParser Lucene’s built-in query parser has been a burden on developers trying to extend the default query syntax. While changing certain parts of it, such as query instantiation, could be readily achieved by subclassing the parser, changing the actual syntax required deep knowledge of the JavaCC parser-generator. The new contrib package QueryParser provides a complete query parser framework, which is fully compliant with the core parser but enables flexible customization by using a modular architecture. The basic idea of the new query parser is to separate the syntax from the semantics of a query, internally represented as a tree. Ultimately the parser splits up in three stages: 1. Parsing stage: transforms the query text (syntax) into a QueryNode tree. This stage is exploited by a single interface (SyntaxParser) mandatory for custom implementation of this stage. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 18
  • 22. 2. Query-Node processing stage: once the QueryNode tree is created, a chain of processors start working on the tree. While walking down the tree, a processor can apply query optimizations, child reordering, or term tokenization even before the query is actually executed. 3. Building stage: the final stage builds the actual Lucene Query object by mapping QueryNode types to associated builders. Each builder subsequently applies the actual conversion into a Lucene query. The snippet below, taken from the new standard QueryParser implementation, shows how the stages are exposed at the API's top level. QueryNode queryTree = this.syntaxParser.parse(query, getField()); queryTree = this.processorPipeline.process(queryTree); return (Query) this.builder.build(queryTree); To provide a smooth transition from the existing core parser to the new API, this contrib package also contains an implementation fully compliant with the standard query syntax. This not only helps the switch to the new query parser but it also serves as an example of how to use and extend the API. That said, the standard implementation is based on the new query parser API and therefore it can't simply replace a core parser as is. If you have been replacing Lucene's current query parser, you can use QueryParserWrapper instead, which preserves the old query parser interface but calls the new parser framework. One final caveat: the QueryParserWrapper is marked as deprecated, as the new query parser will be moved to the core in the upcoming release and eventually replace the old API. Minor Changes and Improvements in Lucene 2.9 Beside the improvements and entirely new features, Lucene 2.9 contains several minor improvements worth mentioning. The following points are a partial outline of minor changes. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 19
  • 23. Term vector-based highlighter: a new term highlighter implementation based on term vectors (essentially a view of terms, offsets, and positions in a documents field). It supports features like N-Gram fields and phrase-unit highlighting with slops and yields good performance on large documents. The downside is that it requires a lot more disk space due to stored term vectors. [BACK- COMPATIBILITY] Collector replaces HitCollector: the low-level HitCollector was deprecated and replaced with a new Collector class. Collector offers a more efficient API to collect hits across sequential IndexReader instances. The most significant improvement here is that score calculation is now decoupled from collecting hits or skipped entirely if not needed—a nice new efficiency. Improved String “interning”: Lucene 2.9 internally uses a custom String intern cache instead of Java's default String.intern(). The lockless implementation yields minor internal performance improvements. New n-gram distance: a new n-gram–based distance measure was added to the contrib spellcheck package. [BACK- COMPATIBILITY] Weight is now an abstract class: the Weight interface was refactored to an abstract class including minor method signature changes. ExtendedFieldCache marked deprecated: All methods and parsers from the interface ExtendedFieldCache have been moved into FieldCache. ExtendedFieldCache is now deprecated and contains only a few declarations for binary backwards compatibility. [BACK- COMPATIBILITY] MergePolicy interface changed: MergePolicy now requires an IndexWriter instance to be passed upon instantiation. As a result, IndexWriter was removed as a method argument from all MergePolicy methods. For a complete list of improvements, bug-fixes, compatibility, and runtime behavior changes you should consult the CHANGES.txt file included in the Lucene distribution (http://lucene.apache.org/java/2_9_0/changes/Changes.html). What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 20
  • 24. Strategies for Upgrading to Lucene 2.9 In the main, a Lucene-based application will benefit from the improvements in 2.9, even as its new features such as numeric capabilities and the new TokenStream API do require code modifications and may require reindexing in order to take full advantage. That said, compared to previous version changes, an upgrade to version 2.9 requires a more sophisticated upgrade procedure. True, there are many cases in which an upgrade won't require code changes, as changes limited to “expert” APIs won't affect applications only using high-level functionality. All the same, even if an application complies with Lucene 2.9, it is likely that some of the changes in runtime characteristics can introduce unexpected behaviors. In the sections below, we’ll offer some brief suggestions for making the transition. In the months ahead, the next major version of Apache Lucene will be underway. That said, one cannot assume that an upgrade to 2.9 is not worthwhile given the numbering of the next release (i.e., version 3.0). It is also slated to be a deprecation release, in which all deprecated-marked code in Lucene 2.9 will be removed. Some parts of the API might be modified in order to make use of Java Generics, but in general the upgrade from 2.9 to 3.0 should be as seamless as earlier upgrades have been. Once you have replaced the usage of any deprecated API(s) in your code, you should then be able to upgrade the next time simply by replacing the Lucene JAR file. Upgrade to 2.9—Recommended Actions At a minimum, if you plan an upgrade of your search application to Lucene 2.9, you should recompile your application against the new version before the application is rolled out in a production environment. The most critical issues will immediately raise a compile-time error once the JAR is in the classpath. For those of you using Lucene from a single location, for example, in the JRE's ext directory, you should make sure that 2.9 is the only Lucene version accessible. In cases where an application relies on extending Lucene in any particular way and the upgrade doesn't raise a compile-time error, it is recommended that you add a test-case for the extension based on the behavior executed against the older version of Lucene. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 21
  • 25. It is also extremely important that you backup and archive your index before opening it with Lucene 2.9, as it will make changes to the index that may not be readable by previous versions. Again, we strongly recommend a careful reading of the CHANGES.txt file included in every Lucene distribution, especially the sections on back-compatibility policy and on changes in runtime behavior. Careful study followed by proper planning and testing should prevent you from running into any surprises once the new Lucene 2.9-based application goes into production. Upgrade to 2.9—Optional Actions Lucene 2.9 includes many new features that are not required for use of the new release. Nevertheless, 2.9 has numerous parts of the API marked as deprecated, since they are to be removed in the next release. To prepare for the next release and further improvements in this direction, it is strongly recommended that you replace any deprecated API during the upgrade process. Applications using any kind of numeric searches can improve their performance heavily by replacing custom solution with Lucene's Numeric Capabilities described earlier in this white paper. Last but not least, the new TokenStream API will replace the older API entirely in the next release. Custom TokenStream, TokenFilter, and Tokenizer implementations should be updated to the attribute-based API. Here, the source distribution contains basic test cases that can help you safely upgrade. Finally, to reiterate, you would do best to write new added test cases against their current Lucene version, and upgrade the test and your code once you have gained enough confidence in the stability of the upgrade. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 22
  • 26. References http://lucene.apache.org/java/2_9_0/index.html http://lucene.apache.org/java/2_9_0/changes/Changes.html http://lucene.apache.org/java/2_9_0/changes/Contrib-Changes.html http://www.lucidimagination.com/Community/Hear-from-the-Experts/Podcasts-and- Videos/Interview-Uwe-Schindler http://wiki.apache.org/lucene-java/NearRealtimeSearch http://wiki.apache.org/lucene-java/Payloads http://www.lucidimagination.com/blog/2009/08/05/getting-started-with-payloads/ http://wiki.apache.org/lucene-java/ConceptsAndDefinitions http://wiki.apache.org/lucene-java/FlexibleIndexing http://wiki.apache.org/lucene-java/Java_1.5_Migration http://www.lucidimagination.com/How-We-Can-Help/webinar-Lucene-29 http://www.nsshutdown.com/projects/lucene/whitepaper/locallucene_v2.html http://www.lucidimagination.com/Community/Hear-from-the-Experts/Podcasts-and- Videos/Interview-Ryan-McKinley http://ocw.kfupm.edu.sa/user062/ICS48201/NLLight%20Stemming%20for%20Arabic% 20Information%20Retrieval.pdf https://javacc.dev.java.net/ What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 23
  • 27. Next Steps For more information on how Lucid Imagination can help search application developers, employees, customers, and partners find the information they need, please visit http://www.lucidimagination.com to access blog posts, articles, and reviews of dozens of successful implementations. Certified Distributions from Lucid Imagination are complete, supported bundles of software which include additional bug fixes, performance enhancements, along with our free 30-day Get Started program. Coupled with one of our support subscriptions, a Certified Distribution can provide a complete environment to develop, deploy, and maintain commercial-grade search applications. Certified Distributions are available at www.lucidimagination.com/Downloads. Please e-mail specific questions to: Support and Service: support@lucidimagination.com Sales and Commercial: sales@lucidimagination.com Consulting: consulting@lucidimagination.com Or call: 1.650.353.4057 What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 24
  • 28. APPENDIX: Choosing Lucene or Solr The great improvements in the capabilities of Lucene and Solr open source search technology have created rapidly growing interest in using them as alternatives for their search applications. As is often the case with open source technology, online community documentation provides rich details on features and variations, but does little to provide explicit direction on which technologies would be the best choice. So when is Lucene preferable to Solr and vice versa? There is in fact no single answer, as Lucene and Solr bring very similar underlying technology to bear on somewhat distinct problems. Solr is versatile and powerful, a full- featured, production-ready search application server requiring little formal software programming. Lucene presents a collection of directly callable Java libraries, with fine- grained control of machine functions and independence from higher-level protocols. In choosing which might be best for your search solution, the key questions to consider are application scope, deployment environment, and software development preferences. If you are new to developing search applications, you should start with Solr. Solr provides scalable search power out of the box, whereas Lucene requires solid information retrieval experience and some meaningful heavy lifting in Java to take advantage of its capabilities. In many instances, Solr doesn’t even require any real programming. Solr is essentially the “serverization” of Lucene, and many of its abstract functions are highly similar, if not the just the same. If you are building an app for the enterprise sector, for instance, you will find Solr almost a 100% match to your business requirements: it comes ready to run in a servlet container such as Tomcat or Jetty, and ready to scale in a production Java environment. Its RESTful interfaces and XML-based configuration files can greatly accelerate application development and maintenance. In fact, Lucene programmers have often reported that they find Solr to contain “the same features I was going to build myself as a framework for Lucene, but already very well implemented.” Once you start with Solr, and you find yourself using a lot of the features Solr provides out of the box, you will likely be better off using Solr’s well organized extension mechanisms instead of starting from scratch using Apache Lucene. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 25
  • 29. If, on the other hand, you do not wish to make any calls via HTTP, and wish to have all of your resources controlled exclusively by Java API calls that you write, Lucene may be a better choice. Lucene can work best when constructing and embedding a state-of-the-art search engine, by allowing programmers to assemble and compile inside a native Java application. Some programmers set aside the convenience of Solr in order to more directly control the large set of sophisticated features with low-level access, data, or state manipulation, and choose Lucene instead, for example, with byte-level manipulation of segments or intervention in data I/O. Investment at the low level enables development of extremely sophisticated, cutting edge text search and retrieval capabilities. As for features, the latest version of Solr generally encapsulates the latest version of Lucene. As the two are in many ways functional siblings, spending time gaining a solid understanding how Lucene works internally can help you understand Apache Solr and its extension of Lucene's workings. No matter which you choose, the power of open source search is yours to harness. More information on both Lucene and Solr can be found at www.lucidimagination.com. What’s New in Lucene 2.9 A Lucid Imagination Technical White Paper • October 2009 Page 26