Class OLuceneSearchOnFieldsFunction
java.lang.Object
com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
com.orientechnologies.lucene.functions.OLuceneSearchFunctionTemplate
com.orientechnologies.lucene.functions.OLuceneSearchOnFieldsFunction
- All Implemented Interfaces:
OIndexableSQLFunction,OSQLFunction
Created by frank on 15/01/2017.
-
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
maxParams, minParams, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] params, OCommandContext ctx) Process a record.getName()Function name, the name is used by the sql parser to identify a call this function.Returns a convenient SQL String representation of the function.<T> boolean<T> List<T>intersection(List<T> list1, List<T> list2) protected OLuceneFullTextIndexsearchForIndex(OFromClause target, OCommandContext ctx, OExpression... args) searchFromTarget(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args) returns all the entries belonging to the target that match the binary condition where this function appearsMethods inherited from class com.orientechnologies.lucene.functions.OLuceneSearchFunctionTemplate
allowsIndexedExecution, canExecuteInline, estimate, getMetadata, shouldExecuteAfterSearchMethods inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
aggregateResults, config, filterResult, getDatabase, getDistributedStorageId, getMaxParams, getMinParams, getResult, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult, shouldMergeDistributedResult, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.sql.functions.OSQLFunction
aggregateResults, config, filterResult, getMaxParams, getMinParams, getResult, mergeDistributedResult, setResult, shouldMergeDistributedResult
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
OLuceneSearchOnFieldsFunction
public OLuceneSearchOnFieldsFunction()
-
-
Method Details
-
getName
Description copied from interface:OSQLFunctionFunction name, the name is used by the sql parser to identify a call this function.- Specified by:
getNamein interfaceOSQLFunction- Overrides:
getNamein classOSQLFunctionAbstract- Returns:
- String , function name, never null or empty.
-
execute
public Object execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] params, OCommandContext ctx) Description copied from interface:OSQLFunctionProcess a record.iCurrentRecord- : current recordiCurrentResult- TODOparams- : function parameters, number is ensured to be within minParams and maxParams.ctx- : object calling this function- Returns:
- function result, can be null. Special cases : can be null if function aggregate results, can be null if function filter results : this mean result is excluded
-
getSyntax
Description copied from interface:OSQLFunctionReturns a convenient SQL String representation of the function.Example :
myFunction( param1, param2, [optionalParam3])
This text will be used in exception messages.
- Returns:
- String , never null.
-
searchFromTarget
public Iterable<OIdentifiable> searchFromTarget(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args) Description copied from interface:OIndexableSQLFunctionreturns all the entries belonging to the target that match the binary condition where this function appears- Parameters:
target- the query targetoperator- the operator after the function, eg. inselect from Foo where myFunction(name) > 4the operator is >rightValue- the value that has to be compared to the function result, eg. inselect from Foo where myFunction(name) > 4the right value is 4ctx- the command context for this queryargs- the function arguments, eg. inselect from Foo where myFunction(name) > 4the arguments are [name]- Returns:
- an iterable of records that match the condition; null means that the execution could not be performed for some reason.
-
searchForIndex
protected OLuceneFullTextIndex searchForIndex(OFromClause target, OCommandContext ctx, OExpression... args) - Specified by:
searchForIndexin classOLuceneSearchFunctionTemplate
-
intersection
-
intersect
-