public class Lucene extends ReloadableModule implements NodeEventListener, RelationEventListener, IdEventListener, AssignmentEvents.Listener
| Modifier and Type | Class and Description |
|---|---|
static class |
Lucene.ConfigurationRead |
class |
Lucene.Scheduler
Queue for index operations.
|
| Modifier and Type | Field and Description |
|---|---|
protected static Parameter<String> |
ANALYZER |
protected Function<Lucene.Scheduler.Assignment> |
assignmentFunction |
protected AssignmentEvents.Listener |
assignmentsListener |
protected static Parameter |
CLASS |
protected Function<Void> |
clearDirectory |
protected static Parameter<Boolean> |
COPY |
protected Function<Void> |
deleteIndexFunction
This function deletes an indexed entry from an index
if the Parameter 'index' has value null, all indexes are iterated over, otherwise
the right index is addressed.
|
protected Function<String> |
descriptionFunction
This function returns the description as configured for a specific index and a specific locale.
|
static String |
DTD_LUCENE |
static String |
DTD_LUCENE_2_0 |
protected static Parameter<Integer> |
EXPLAIN |
protected static Parameter<String> |
EXTRACONSTRAINTS |
protected static Parameter<String> |
FIELDS |
protected static Parameter<String> |
FILTER |
protected Function<Void> |
fullIndexFunction
This function starts a full Index of Lucene.
|
protected Function<Integer> |
fullIndexing |
protected static Parameter<String> |
IDENTIFIER |
protected IdEventListener |
idListener |
protected static Parameter<String> |
INDEX |
protected Function<Set<Indexer>> |
indexerListFunction
This function returns Set with the names of all configured indexes (ordered alphabeticly)
|
protected Function<String> |
interruptFunction |
protected Function<Long> |
lastFullIndexDurationFunction |
protected Function<Date> |
lastFullIndexFunction |
protected Function<Set<String>> |
listFunction
This function returns Set with the names of all configured indexes (ordered alphabeticly)
|
protected static Parameter |
MACHINES |
protected static Parameter<Integer> |
MAX |
protected MMBase |
mmbase |
static String |
NAMESPACE_LUCENE
Most recend namespace
|
static String |
NAMESPACE_LUCENE_1_0 |
protected static Parameter<Integer> |
OFFSET |
protected static Parameter<String> |
ONFAIL |
static String |
PUBLIC_ID_LUCENE
Most recent Lucene config DTD
|
static String |
PUBLIC_ID_LUCENE_2_0 |
protected Function<Collection<Lucene.Scheduler.Assignment>> |
queueFunction |
protected Function<Boolean> |
readOnlyFunction |
protected Function<NodeList> |
searchFunction
This function starts a search fro a given string.
|
protected Function<Integer> |
searchSizeFunction
This function returns the size of a query on an index.
|
protected static Parameter<String> |
SORTFIELDS |
protected Function<String> |
statusDescriptionFunction |
protected Function<Integer> |
statusFunction
This function returns the status of the scheduler.
|
protected Function<Integer> |
unAssignFunction |
protected Function<Void> |
updateIndexFunction
This function can be called through the function framework.
|
protected static Parameter<String> |
VALUE
Parameter constants for Lucene functions.
|
protected Function<Void> |
waitFunction |
static String |
XSD_LUCENE_1_0
But we use XSD now!
|
configurationPath, getMaintainerFunction, getVersionFunction, properties, STATE_START_TIMEdescription, guiName, namefunctions, getFunctions| Constructor and Description |
|---|
Lucene() |
| Modifier and Type | Method and Description |
|---|---|
(package private) MMBaseIndexDefinition |
createIndexDefinition(Element queryElement,
Set<String> allIndexedFieldsSet,
boolean storeText,
boolean mergeText,
String relateFrom,
org.apache.lucene.analysis.Analyzer analyzer)
MMBase Queries and sub-queries
|
static String |
getAttribute(Element element,
String localName)
Returns the value of a certain attribute, either an unqualified attribute or an attribute that fits in the
lucene namespace
|
protected Cloud |
getCloud() |
String |
getDescription()
Returns the description of this object for the default locale.
|
static Lucene |
getLucene() |
Searcher |
getSearcher(String indexName) |
static boolean |
hasAttribute(Element element,
String localName)
Returns whether an element has a certain attribute, either an unqualified attribute or an attribute that fits in the
lucene namespace
|
void |
init()
Initializes the module.
|
protected void |
init(boolean initialWait) |
static void |
main(String[] args)
Main for testing
|
void |
notify(AssignmentEvents.Event event) |
void |
notify(IdEvent event) |
void |
notify(NodeEvent event) |
void |
notify(RelationEvent event) |
protected void |
readConfiguration(String resource) |
void |
reload()
This method should be called when the module should be reloaded.
|
void |
shutdown()
Shuts down the module.
|
reloadConfiguration, reloadConfigurationaddInitParameters, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, onload, setInitParameter, setMaintainer, setState, setVersion, shutdownModules, startModule, startModulesgetDefaultLocale, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setNameaddFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstancepublic static final String PUBLIC_ID_LUCENE_2_0
public static final String DTD_LUCENE_2_0
public static final String PUBLIC_ID_LUCENE
public static final String DTD_LUCENE
public static final String XSD_LUCENE_1_0
public static final String NAMESPACE_LUCENE_1_0
public static final String NAMESPACE_LUCENE
protected MMBase mmbase
protected static final Parameter MACHINES
protected static final Parameter CLASS
protected Function<Void> fullIndexFunction
protected Function<Void> deleteIndexFunction
protected Function<Void> updateIndexFunction
protected Function<Integer> statusFunction
protected Function<Lucene.Scheduler.Assignment> assignmentFunction
protected Function<Collection<Lucene.Scheduler.Assignment>> queueFunction
protected Function<Set<String>> listFunction
protected Function<Set<Indexer>> indexerListFunction
protected Function<String> descriptionFunction
protected Function<NodeList> searchFunction
protected Function<Integer> searchSizeFunction
protected final IdEventListener idListener
protected final AssignmentEvents.Listener assignmentsListener
public static Lucene getLucene()
public static boolean hasAttribute(Element element, String localName)
public static String getAttribute(Element element, String localName)
public void notify(AssignmentEvents.Event event)
notify in interface AssignmentEvents.Listenerpublic void init()
ModuleModule.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.protected void init(boolean initialWait)
protected Cloud getCloud()
public void shutdown()
Modulepublic void reload()
ReloadableModulereload in class ReloadableModulepublic String getDescription()
DescriptorgetDescription in interface DescriptorgetDescription in class DescribedFunctionProviderMMBaseIndexDefinition createIndexDefinition(Element queryElement, Set<String> allIndexedFieldsSet, boolean storeText, boolean mergeText, String relateFrom, org.apache.lucene.analysis.Analyzer analyzer)
protected void readConfiguration(String resource)
public void notify(NodeEvent event)
notify in interface NodeEventListenerpublic void notify(RelationEvent event)
notify in interface RelationEventListenerpublic void notify(IdEvent event)
notify in interface IdEventListenerpublic static void main(String[] args)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}