org.carrot2.apiexample
Class LuceneExample

java.lang.Object
  extended by org.carrot2.apiexample.LuceneExample

public final class LuceneExample
extends Object

This is an example of using the Carrot2 API to cluster search results aquired from a local Lucene index.

This example is a continuation of the API introduction available in the Example class, present in this project.

This tutorial starts in the main(String[]) method.

Author:
Dawid Weiss
See Also:
Example

Constructor Summary
LuceneExample()
           
 
Method Summary
static void main(String[] args)
          Using Carrot2 and Lucene
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneExample

public LuceneExample()
Method Detail

main

public static void main(String[] args)

Using Carrot2 and Lucene

Introduction

In this example we will configure and run a few queries against an index created and searched with Java Information Retrieval library Lucene. You should be familiar with how Lucene creates indexes and how it works. Corresponding documentation is available in that project.

Preparation

Further on we assume that a Lucene index is compiled and available for searches. Carrot2 uses Lucene 2.x JAR internally, so the index should be compatible. In addition to that, we will need three fields, corresponding to the information Carrot2 utilizes:



Copyright (c) Dawid Weiss, Stanislaw Osinski