| java.lang.Object org.compass.core.lucene.util.LuceneHelper
LuceneHelper | abstract public class LuceneHelper (Code) | | Allows to create Compass related objects based on external (internally no supported by Compass)
Lucene objects.
author: kimchy |
createCompassQuery | public static CompassQuery createCompassQuery(CompassSession session, Query query)(Code) | | Creates a new
CompassQuery based on a Lucene
Query .
Allows to create
CompassQuery based on external Lucene
Query that is not supported
by one of Compass query builders.
Parameters: session - Comapss session Parameters: query - The lucene query to wrap A compass query wrapping the lucene query |
createCompassQueryFilter | public static CompassQueryFilter createCompassQueryFilter(CompassSession session, Filter filter)(Code) | | Creates a new
CompassQueryFilter based on a Lucene
Filter .
Allows to create
CompassQueryFilter based on external Lucene
Filter that is not supported
by one fo Comapss query filter builders.
Parameters: session - Comapss session Parameters: filter - The lucene filter to wrap A compass query filter wrapping lucene query. |
getDirectory | public static Directory getDirectory(Compass compass, String subIndex)(Code) | | Returns the lucene
org.apache.lucene.store.Directory associated with the given sub index.
|
getDocument | public static Document getDocument(Resource resource)(Code) | | Returns the actual Lucene
Document that the
Resource wraps.
Parameters: resource - The resource to get the document from The Lucene document that resource wraps |
getLuceneAnalyzerManager | public static LuceneAnalyzerManager getLuceneAnalyzerManager(Compass compass)(Code) | | Returns Compass own internal LuceneAnalyzerManager . Can be used
to access Lucene
org.apache.lucene.analysis.Analyzer at runtime.
|
getLuceneInternalSearch | public static LuceneSearchEngineInternalSearch getLuceneInternalSearch(CompassSession session, String[] subIndexes, String[] aliases)(Code) | | Returns the given search engine "internals" used for search. For Lucene, returns
LuceneSearchEngineInternalSearch which allows to access Lucene
org.apache.lucene.index.IndexReader and
org.apache.lucene.search.Searcher .
The search can be narrowed down to specific sub indexes or aliases. A null value
means all the sub indexes/aliases.
Parameters: session - A compass sessino within a transaction Parameters: subIndexes - A set of sub indexes to narrow down the index scope Parameters: aliases - A set of aliases to narrow down the index scope Lucene search "internals" |
getTermFreqVector | public static TermFreqVector getTermFreqVector(CompassSession session, Resource resource, String propertyName) throws SearchEngineException(Code) | | Returns Lucene
TermFreqVector for the given property and resource, using the session.
Parameters: session - Compass session Parameters: resource - The resource to get the term freq vector for Parameters: propertyName - Theh property name (Lucene field name) to get the term freq vector for Teh term info freq vector for the given resource and property throws: SearchEngineException - |
getTermFreqVectors | public static TermFreqVector[] getTermFreqVectors(CompassSession session, Resource resource) throws SearchEngineException(Code) | | Returns Lucene
TermFreqVector using the given Compass session and
Resource .
Parameters: session - Compass session Parameters: resource - The resource to get the term freq vector for The term infos freq vector for the given resource throws: SearchEngineException - |
|
|