|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.common.events.MCREventHandlerBase
org.mycore.services.fieldquery.MCRSearcher
org.mycore.backend.lucene.MCROldLuceneSearcher
public class MCROldLuceneSearcher
This class builds indexes from mycore meta data. Based on MCRLucenesearcher Version 1.43 for miless-software
| Field Summary | |
|---|---|
(package private) static org.apache.lucene.analysis.Analyzer |
analyzer
Deprecated. |
(package private) static int |
DEC_AFTER
Deprecated. |
(package private) static int |
DEC_BEFORE
Deprecated. |
(package private) boolean |
FIRST
Deprecated. |
(package private) String |
IndexDir
Deprecated. |
(package private) static int |
INT_BEFORE
Deprecated. |
(package private) static String |
LOCK_DIR
Deprecated. |
| Fields inherited from class org.mycore.services.fieldquery.MCRSearcher |
|---|
ID, index, prefix, RETURN_ID_CACHE |
| Constructor Summary | |
|---|---|
MCROldLuceneSearcher()
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addSortData(Iterator<MCRHit> hits,
List<MCRSortBy> sortBy)
Deprecated. Adds field values needed for sorting for those hits that do not have sort data set already. |
void |
addToIndex(String entryID,
String returnID,
List fields)
Deprecated. Adds field values to the search index. |
static org.apache.lucene.document.Document |
buildLuceneDocument(List fields)
Deprecated. Build lucene document from transformed xml list |
void |
clearIndex()
Deprecated. Removes all entries from index. |
static void |
deleteLuceneDocument(String fieldname,
String id,
String indexDir)
Deprecated. Delete all documents in Lucene with id |
static org.apache.lucene.index.IndexWriter |
getLuceneWriter(String indexDir,
boolean first)
Deprecated. Get Lucene Writer |
void |
init(String ID)
Deprecated. Initializes the searcher and sets its unique ID. |
void |
removeFromIndex(String entryID)
Deprecated. Removes the values of the given entry from the backend index. |
MCRResults |
search(MCRCondition condition,
int maxResults,
List<MCRSortBy> sortBy,
boolean addSortData)
Deprecated. Executes a query on this searcher. |
| Methods inherited from class org.mycore.services.fieldquery.MCRSearcher |
|---|
clearIndex, getID, getIndex, getReturnID, handleFileCreated, handleFileDeleted, handleFileRepaired, handleFileUpdated, handleObjectCreated, handleObjectDeleted, handleObjectRepaired, handleObjectUpdated, notifySearcher, undoObjectCreated, undoObjectDeleted |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.mycore.common.events.MCREventHandler |
|---|
doHandleEvent, undoHandleEvent |
| Field Detail |
|---|
String IndexDir
boolean FIRST
static String LOCK_DIR
static int INT_BEFORE
static int DEC_BEFORE
static int DEC_AFTER
static org.apache.lucene.analysis.Analyzer analyzer
| Constructor Detail |
|---|
public MCROldLuceneSearcher()
| Method Detail |
|---|
public void init(String ID)
MCRSearcher
init in class MCRSearcherID - the non-null unique ID of this searcher instance
public void addToIndex(String entryID,
String returnID,
List fields)
MCRSearcher
addToIndex in class MCRSearcherentryID - the unique ID of this entry in the indexreturnID - the ID to return as result of a search (MCRHit ID)fields - a List of MCRFieldValue objects
public static org.apache.lucene.document.Document buildLuceneDocument(List fields)
throws Exception
fields - corresponding to lucene fields
Exception
public static org.apache.lucene.index.IndexWriter getLuceneWriter(String indexDir,
boolean first)
throws Exception
indexDir - directory where lucene index is store first check existance of
index directory, if it does nor exist create it
Exceptionpublic void removeFromIndex(String entryID)
MCRSearcher
removeFromIndex in class MCRSearcherentryID - the unique ID of this entry in the index
public static void deleteLuceneDocument(String fieldname,
String id,
String indexDir)
throws Exception
fieldname - string name of lucene field with stored idid - string document idindexDir - *
the directory where index is stored
Exception
public MCRResults search(MCRCondition condition,
int maxResults,
List<MCRSortBy> sortBy,
boolean addSortData)
MCRSearcher
search in class MCRSearchermaxResults - the maximum number of results to return, 0 means all resultssortBy - a not-null list of MCRSortBy sort criteria. The list is empty if the results should not be sortedaddSortData - if false, backend should sort results itself while executing the query. If this is not possible or the parameter is true, backend should not
sort the results itself, but only store the data of the fields in the sortBy list which are needed to sort later
public void addSortData(Iterator<MCRHit> hits,
List<MCRSortBy> sortBy)
MCRSearcher
addSortData in class MCRSearcherhits - the MCRHit objects that do not have sort data setsortBy - the MCRFieldDef fields that are sort criteriapublic void clearIndex()
MCRSearcher
clearIndex in class MCRSearcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||