To use Lucene in a Maven 2 project, add the following dependency
to your project's pom.xml
:
Example 12.2. Adding a Dependency on Lucene
<dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-core</artifactId> <version>1.9.1</version> </dependency>
If you are not sure what this means, I'd suggest reading Maven: The Definitive
Guide. When you depend on a library in Maven 2, all you need to
do is add the dependency groupId
,
artifactId
, and version
to your
project's dependencies. Once you do this, Maven 2 will download the
dependency and make it available on your project's classpath.
Lucene is a full-text search engine that can be used to index any information.
Lucene maintains an index of Document
objects that can contain any number of fields, and this index can be
searched using a highly developed query language.
For more information on the Lucene project, see the Lucene project page at http://lucene.apache.org/.