|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.gouv.culture.sdx.search.lucene.query.SearchLocations
A list of LuceneIndex where searches can be made.
Constructor Summary | |
SearchLocations()
Builds an empty search location. |
Method Summary | |
void |
addIndex(Index index)
Adds an index to locations. |
boolean |
contains(Index index)
|
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
Sets the logger. |
Field |
getDefaultField()
Returns the default field for the first search location (first index). |
Field |
getField(java.lang.String name)
Returns a field given a name. |
int |
getFieldType(java.lang.String name)
Returns the type of a field given its name. |
org.apache.lucene.index.IndexReader |
getIndexReader(int idx)
Returns an index reader at the specified index. |
java.util.Locale |
getLocale(java.lang.String name)
Returns the locale for a field given its name. |
QueryParser |
getQueryParser()
|
org.apache.lucene.search.Searcher |
getSearcher()
Returns a searcher for these locations. |
java.lang.String |
getTypeName(java.lang.String name)
Returns the typeName of a field given its name. |
void |
setQueryParser(QueryParser qParser)
|
void |
setUp(Index index)
Builds a search location with a single index. |
int |
size()
Returns the number of indices in this search location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SearchLocations()
enableLogging(org.apache.avalon.framework.logger.Logger)
,
addIndex(fr.gouv.culture.sdx.search.lucene.query.Index)
Method Detail |
public void setUp(Index index)
index
- The Lucene index to use.public void addIndex(Index index)
index
- The index to add.public Field getDefaultField() throws SDXException
SDXException
public Field getField(java.lang.String name) throws SDXException
null
if none found.
name
- The name of the field for which the Field is desired.
SDXException
public int getFieldType(java.lang.String name) throws SDXException
name
- The field name.
SDXException
public java.lang.String getTypeName(java.lang.String name) throws SDXException
name
- The field name.
SDXException
public org.apache.lucene.index.IndexReader getIndexReader(int idx) throws SDXException
idx
- The index of the desired reader.
SDXException
public java.util.Locale getLocale(java.lang.String name) throws SDXException
name
- The name of the field for which the Locale is desired.
SDXException
public org.apache.lucene.search.Searcher getSearcher() throws SDXException
SDXException
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
enableLogging
in interface org.apache.avalon.framework.logger.LogEnabled
logger
- The logger to use.public int size()
public QueryParser getQueryParser()
public void setQueryParser(QueryParser qParser)
public boolean contains(Index index)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |