|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.smila.search.index.IndexConnection
public abstract class IndexConnection
A Class class.
| Field Summary | |
|---|---|
protected DIndex |
_index
Index configuration from data dictionary. |
protected java.lang.String |
_indexName
Index name. |
| Constructor Summary | |
|---|---|
protected |
IndexConnection(java.lang.String indexName)
|
| Method Summary | |
|---|---|
protected abstract void |
addHighlightAnnotation(IQueryExpression dQE,
java.lang.String recordId,
AnyMap highlight,
int fieldNo,
java.lang.String attributeName,
java.lang.String indexName)
Adds a highlighting annotation on the given record and attribute |
protected abstract void |
close()
Close index connection. |
protected abstract Value |
createValue(DataFactory f,
int fieldNo,
java.lang.String value)
create value from string using the appropriate type method. |
abstract void |
deleteDocument(java.lang.String id)
Delete document from index. |
abstract boolean |
docExists(java.lang.String id)
Checks whether a document exists in index. |
LuceneSearchResult |
doQuery(DQuery dQuery)
Performs a search for a fully complex query expression. |
LuceneSearchResult |
doQuery(IQueryExpression dQE)
|
protected abstract LuceneSearchResult |
doQuery(IQueryExpression dQE,
int startPos)
Execute search query. |
LuceneSearchResult |
doTestQuery(java.lang.String text)
Execute test query. |
protected abstract void |
encodeTextField(DTextField tf)
|
DIndex |
getIndex()
Get index configuration definition from data dictionary. |
java.lang.String |
getName()
Get index name. |
protected abstract void |
getResultValues(java.lang.String[] keys,
int[] fields,
java.lang.String[][] values)
|
protected abstract java.lang.String[] |
getResultValues(java.lang.String id,
int fieldNo)
|
abstract IQueryExpression |
getSimpleSearchQuery(DQuery dQuery)
Transform a simple search to the corresponding advanced search. |
protected abstract IQueryExpression |
getTestQueryExpression(java.lang.String text)
|
protected abstract void |
insertDateParameter(DDateField field,
IDFParameter configParameter,
java.lang.String config,
java.lang.StringBuffer sb)
|
protected abstract void |
insertNumberParameter(DNumberField field,
INFParameter configParameter,
java.lang.String config,
java.lang.StringBuffer sb)
|
protected abstract void |
insertTextParameter(DTextField field,
ITFParameter configParameter,
java.lang.String config,
java.lang.StringBuffer sb)
|
protected abstract void |
isSupportedValue(int fieldNo,
java.lang.Object value)
|
abstract void |
learnDocument(Blackboard blackboard,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.Integer> attributeMapping,
java.util.Map<java.lang.String,java.lang.Integer> attachmentMapping)
Add a document to index. |
protected abstract void |
startBurstmode()
Start burst mode. |
protected abstract void |
stopBurstmode()
Stop burst mode. |
abstract void |
unlock()
Unlocks a locked index. |
void |
validateQuery(DQuery dQuery)
This method extends a given search query with all possible configurable attributes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DIndex _index
protected java.lang.String _indexName
| Constructor Detail |
|---|
protected IndexConnection(java.lang.String indexName)
throws IndexException
indexName - name of index to be created
IndexException - Unable to create index connection.| Method Detail |
|---|
public java.lang.String getName()
public DIndex getIndex()
protected abstract void close()
public abstract boolean docExists(java.lang.String id)
throws IndexException
id - the Id
IndexException - Unable to check the document exists in index.
public abstract void deleteDocument(java.lang.String id)
throws IndexException
id - the Id
IndexException - Unable to delete document from index.
public abstract void learnDocument(Blackboard blackboard,
java.lang.String id,
java.util.Map<java.lang.String,java.lang.Integer> attributeMapping,
java.util.Map<java.lang.String,java.lang.Integer> attachmentMapping)
throws IndexException,
BlackboardAccessException
blackboard - the BlackboardServiceid - the Id of the record to add.attributeMapping - Map containing the attribute to FieldNo mappingattachmentMapping - Map containing the attachment to FieldNo mapping
IndexException - Unable to add document to index.
BlackboardAccessException - if errors occur accessing the Blackboard
protected abstract void startBurstmode()
throws IndexException
IndexException - Unable to start burst mode.
protected abstract void stopBurstmode()
throws IndexException
IndexException - Unable to stop burst mode.
public abstract IQueryExpression getSimpleSearchQuery(DQuery dQuery)
throws IndexException,
NodeTransformerException,
TemplateException
dQuery - Simple search.
IndexException - Unable to get advanced search.
NodeTransformerException - Unable to perform node transformation.
TemplateException - Unable to apply template.
protected abstract LuceneSearchResult doQuery(IQueryExpression dQE,
int startPos)
throws IndexException
dQE - Advanced search query.startPos - Start position.
IndexException - Unable to perform search query.
protected abstract IQueryExpression getTestQueryExpression(java.lang.String text)
throws IndexException
text - -
IndexException - -
protected abstract void insertTextParameter(DTextField field,
ITFParameter configParameter,
java.lang.String config,
java.lang.StringBuffer sb)
field - -configParameter - -config - -sb - -
protected abstract void insertNumberParameter(DNumberField field,
INFParameter configParameter,
java.lang.String config,
java.lang.StringBuffer sb)
field - -configParameter - -config - -sb - -
protected abstract void insertDateParameter(DDateField field,
IDFParameter configParameter,
java.lang.String config,
java.lang.StringBuffer sb)
field - -configParameter - -config - -sb - -
protected abstract void getResultValues(java.lang.String[] keys,
int[] fields,
java.lang.String[][] values)
throws IndexException
keys - -fields - -values - -
IndexException - -
protected abstract java.lang.String[] getResultValues(java.lang.String id,
int fieldNo)
throws IndexException
IndexException
protected abstract void encodeTextField(DTextField tf)
throws IndexException
tf - -
IndexException - -
protected abstract void isSupportedValue(int fieldNo,
java.lang.Object value)
throws IndexException
fieldNo - -value - -
IndexException - -
public void validateQuery(DQuery dQuery)
throws IndexException
dQuery - -
IndexException - -
public LuceneSearchResult doQuery(IQueryExpression dQE)
throws IndexException
IndexException
public LuceneSearchResult doQuery(DQuery dQuery)
throws IndexException
dQuery - -
IndexException - -
protected abstract Value createValue(DataFactory f,
int fieldNo,
java.lang.String value)
throws IndexException
fieldNo - the fieldNovalue - the string value
IndexException - if any error occurs
protected abstract void addHighlightAnnotation(IQueryExpression dQE,
java.lang.String recordId,
AnyMap highlight,
int fieldNo,
java.lang.String attributeName,
java.lang.String indexName)
throws IndexException
dQE - the IQueryExpressionrecordId - record idhighlight - the highlight annotation.fieldNo - the fieldNoattributeName - the name of the attributeindexName - the name of the index
IndexException - if any errorr occurs
public LuceneSearchResult doTestQuery(java.lang.String text)
throws IndexException
text - Query text.
IndexException - Unable to perform test query.
public abstract void unlock()
throws IndexException
IndexException - if any error occurs
|
SMILA (incubation) API documentation | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||