org.compass.core.lucene.util
Class LuceneUtils

java.lang.Object
  extended by org.compass.core.lucene.util.LuceneUtils

public abstract class LuceneUtils
extends Object

Author:
kimchy

Constructor Summary
LuceneUtils()
           
 
Method Summary
static void addAllPropertyIfNeeded(Resource resource, ResourceMapping resourceMapping, LuceneSearchEngine searchEngine)
           
static void addExtendedProeprty(Resource resource, ResourceMapping resourceMapping, LuceneSearchEngine searchEngine)
           
static void applyBoostIfNeeded(InternalResource resource, SearchEngine searchEngine)
           
static Query buildResourceLoadQuery(LuceneSearchEngineFactory searchEngineFactory, ResourceKey resourceKey)
           
static Query buildResourceLoadQuery(LuceneSearchEngineFactory searchEngineFactory, String subIndex, ResourceKey resourceKey)
           
static void clearLocks(Lock[] locks)
           
static void createResource(IndexWriter indexWriter, Resource resource, Analyzer analyzer)
           
static boolean deleteDir(File dir)
           
static List findPropertyValues(IndexReader indexReader, String propertyName)
           
static Field.Index getFieldIndex(Property.Index index)
           
static Field.Store getFieldStore(Property.Store store)
           
static Field.TermVector getFieldTermVector(Property.TermVector termVector)
           
static Resource[] hitsToResourceArray(Hits hits, LuceneSearchEngine searchEngine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneUtils

public LuceneUtils()
Method Detail

buildResourceLoadQuery

public static Query buildResourceLoadQuery(LuceneSearchEngineFactory searchEngineFactory,
                                           ResourceKey resourceKey)

buildResourceLoadQuery

public static Query buildResourceLoadQuery(LuceneSearchEngineFactory searchEngineFactory,
                                           String subIndex,
                                           ResourceKey resourceKey)

hitsToResourceArray

public static Resource[] hitsToResourceArray(Hits hits,
                                             LuceneSearchEngine searchEngine)
                                      throws SearchEngineException
Throws:
SearchEngineException

applyBoostIfNeeded

public static void applyBoostIfNeeded(InternalResource resource,
                                      SearchEngine searchEngine)

createResource

public static void createResource(IndexWriter indexWriter,
                                  Resource resource,
                                  Analyzer analyzer)
                           throws SearchEngineException
Throws:
SearchEngineException

addExtendedProeprty

public static void addExtendedProeprty(Resource resource,
                                       ResourceMapping resourceMapping,
                                       LuceneSearchEngine searchEngine)

addAllPropertyIfNeeded

public static void addAllPropertyIfNeeded(Resource resource,
                                          ResourceMapping resourceMapping,
                                          LuceneSearchEngine searchEngine)
                                   throws SearchEngineException
Throws:
SearchEngineException

findPropertyValues

public static List findPropertyValues(IndexReader indexReader,
                                      String propertyName)
                               throws SearchEngineException
Throws:
SearchEngineException

getFieldIndex

public static Field.Index getFieldIndex(Property.Index index)
                                 throws SearchEngineException
Throws:
SearchEngineException

getFieldStore

public static Field.Store getFieldStore(Property.Store store)
                                 throws SearchEngineException
Throws:
SearchEngineException

getFieldTermVector

public static Field.TermVector getFieldTermVector(Property.TermVector termVector)
                                           throws SearchEngineException
Throws:
SearchEngineException

deleteDir

public static boolean deleteDir(File dir)

clearLocks

public static void clearLocks(Lock[] locks)


Copyright (c) 2004-2006 The Compass Project.