|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.weborganic.bastille.flint.helpers.MultipleIndex
public final class MultipleIndex
Handles multiple Index Masters, each master is specified by its index directory.
Nested Class Summary | |
---|---|
class |
MultipleIndex.MultipleIndexReader
Handle a list of readers. |
Constructor Summary | |
---|---|
MultipleIndex(List<File> indexDirectories)
Build a new multiple index. |
Method Summary | |
---|---|
List<Facet> |
getFacets(List<String> fields,
int upTo,
Query query)
Returns the list of term and how frequently they are used by performing a fuzzy match on the specified term. |
static IndexMaster |
getMaster(File index)
Deprecated. Use getMaster(File) instead |
MultipleIndex.MultipleIndexReader |
getMultiReader()
|
MultiSearchResults |
query(SearchQuery query)
Perform a query on multiple indexes. |
MultiSearchResults |
query(SearchQuery query,
SearchPaging paging)
Perform a query on multiple indexes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultipleIndex(List<File> indexDirectories)
indexDirectories
- the root folders for all indexesMethod Detail |
---|
@Deprecated public static IndexMaster getMaster(File index)
getMaster(File)
instead
index
- The directory for the index to return
public MultiSearchResults query(SearchQuery query) throws IndexException
Note that all the indexes MUST be initialized before calling this method.
query
- the query to perform.
IndexException
- If the query failed
IllegalStateException
- If one of the indexes is not initializedpublic MultiSearchResults query(SearchQuery query, SearchPaging paging) throws IndexException
Note that all the indexes MUST be initialised before calling this method.
query
- the query to perform.paging
- the paging mechanism
IndexException
- If the query failed
IllegalStateException
- If one of the indexes is not initialisedpublic List<Facet> getFacets(List<String> fields, int upTo, Query query) throws IOException, IndexException
fields
- the fields to use as facetsupTo
- the max number of values to returnquery
- a predicate to apply on the facet (can be null or empty)
IndexException
- if there was an error reading the indexes or creating the condition query
IllegalStateException
- If one of the indexes is not initialised
IOException
public MultipleIndex.MultipleIndexReader getMultiReader()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |