
public class OLuceneSearchMoreLikeThisFunction extends OSQLFunctionAbstract implements OIndexableSQLFunction
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
maxParams, minParams, name| Constructor and Description |
|---|
OLuceneSearchMoreLikeThisFunction() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsIndexedExecution(OFromClause target,
OBinaryCompareOperator operator,
Object rightValue,
OCommandContext ctx,
OExpression... args)
Checks if this function can be used to fetch data from this target and with these arguments (eg.
|
boolean |
canExecuteInline(OFromClause target,
OBinaryCompareOperator operator,
Object rightValue,
OCommandContext ctx,
OExpression... args)
checks if the function can be used even on single records, not as an indexed function (even if the index does not exist at all)
|
long |
estimate(OFromClause target,
OBinaryCompareOperator operator,
Object rightValue,
OCommandContext ctx,
OExpression... args)
estimates the number of entries returned by searchFromTarget() with these parameters
|
Object |
execute(Object iThis,
OIdentifiable iCurrentRecord,
Object iCurrentResult,
Object[] params,
OCommandContext ctx)
Process a record.
|
String |
getName()
Function name, the name is used by the sql parser to identify a call this function.
|
String |
getSyntax()
Returns a convenient SQL String representation of the function.
|
Iterable<OIdentifiable> |
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 appears
|
boolean |
shouldExecuteAfterSearch(OFromClause target,
OBinaryCompareOperator operator,
Object rightValue,
OCommandContext ctx,
OExpression... args)
Checks if this function should be called even if the method
OIndexableSQLFunction.searchFromTarget(com.orientechnologies.orient.core.sql.parser.OFromClause, com.orientechnologies.orient.core.sql.parser.OBinaryCompareOperator, java.lang.Object, com.orientechnologies.orient.core.command.OCommandContext, com.orientechnologies.orient.core.sql.parser.OExpression...) is executed. |
aggregateResults, config, filterResult, getDistributedStorageId, getMaxParams, getMinParams, getResult, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult, shouldMergeDistributedResult, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaggregateResults, config, filterResult, getMaxParams, getMinParams, getResult, mergeDistributedResult, setResult, shouldMergeDistributedResultpublic static final String NAME
public String getName()
OSQLFunctiongetName in interface OSQLFunctiongetName in class OSQLFunctionAbstractpublic Object execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] params, OCommandContext ctx)
OSQLFunctionexecute in interface OSQLFunctioniCurrentRecord - : current recordiCurrentResult - TODOparams - : function parameters, number is ensured to be within minParams and maxParams.ctx - : object calling this functionpublic String getSyntax()
OSQLFunctionExample :
myFunction( param1, param2, [optionalParam3])This text will be used in exception messages.
getSyntax in interface OSQLFunctionpublic Iterable<OIdentifiable> searchFromTarget(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunctionsearchFromTarget in interface OIndexableSQLFunctiontarget - the query targetoperator - the operator after the function, eg. in select from Foo where myFunction(name) > 4 the operator is >rightValue - the value that has to be compared to the function result, eg. in select from Foo where myFunction(name) > 4 the right value is 4ctx - the command context for this queryargs - the function arguments, eg. in select from Foo where myFunction(name) > 4 the arguments are [name]public long estimate(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunctionestimate in interface OIndexableSQLFunctiontarget - the query targetoperator - the operator after the function, eg. in select from Foo where myFunction(name) > 4 the operator is >rightValue - the value that has to be compared to the function result, eg. in select from Foo where myFunction(name) > 4 the right value is 4ctx - the command context for this queryargs - the function arguments, eg. in select from Foo where myFunction(name) > 4 the arguments are [name]public boolean canExecuteInline(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunctioncanExecuteInline in interface OIndexableSQLFunctiontarget - the query targetoperator - the operator after the function, eg. in select from Foo where myFunction(name) > 4 the operator is >rightValue - the value that has to be compared to the function result, eg. in select from Foo where myFunction(name) > 4 the right value is 4ctx - the command context for this queryargs - the function arguments, eg. in select from Foo where myFunction(name) > 4 the arguments are [name]public boolean allowsIndexedExecution(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunctionallowsIndexedExecution in interface OIndexableSQLFunctiontarget - the query targetoperator - the operator after the function, eg. in select from Foo where myFunction(name) > 4 the operator is >rightValue - the value that has to be compared to the function result, eg. in select from Foo where myFunction(name) > 4 the right value is 4ctx - the command context for this queryargs - the function arguments, eg. in select from Foo where myFunction(name) > 4 the arguments are [name]public boolean shouldExecuteAfterSearch(OFromClause target, OBinaryCompareOperator operator, Object rightValue, OCommandContext ctx, OExpression... args)
OIndexableSQLFunctionOIndexableSQLFunction.searchFromTarget(com.orientechnologies.orient.core.sql.parser.OFromClause, com.orientechnologies.orient.core.sql.parser.OBinaryCompareOperator, java.lang.Object, com.orientechnologies.orient.core.command.OCommandContext, com.orientechnologies.orient.core.sql.parser.OExpression...) is executed.shouldExecuteAfterSearch in interface OIndexableSQLFunctiontarget - the query targetoperator - the operator after the function, eg. in select from Foo where myFunction(name) > 4 the operator is >rightValue - the value that has to be compared to the function result, eg. in select from Foo where myFunction(name) > 4 the right value is 4ctx - the command context for this queryargs - the function arguments, eg. in select from Foo where myFunction(name) > 4 the arguments are [name]OIndexableSQLFunction.searchFromTarget(com.orientechnologies.orient.core.sql.parser.OFromClause, com.orientechnologies.orient.core.sql.parser.OBinaryCompareOperator, java.lang.Object, com.orientechnologies.orient.core.command.OCommandContext, com.orientechnologies.orient.core.sql.parser.OExpression...) is executed. False otherwiseCopyright © 2009–2025 OrientDB. All rights reserved.