public interface PlanBuilderBase
Modifier and Type | Interface and Description |
---|---|
static interface |
PlanBuilderBase.AccessPlanBase
Defines base methods for AccessPlan.
|
static interface |
PlanBuilderBase.ExportablePlanBase
Defines base methods for ExportablePlan.
|
static interface |
PlanBuilderBase.ModifyPlanBase
Defines base methods for ModifyPlan.
|
static interface |
PlanBuilderBase.PlanBase
Defines base methods for Plan.
|
static interface |
PlanBuilderBase.PreparePlanBase
Defines base methods for PreparePlan.
|
Modifier and Type | Method and Description |
---|---|
ServerExpression |
caseExpr(PlanCase... cases)
This function returns the specified value expression if the specified value expression is true.
|
PlanGroupSeq |
cube(java.lang.String... keys)
Specifies the keys for a sequence of groups that provide a cube for a row set.
|
PlanCase |
elseExpr(ServerExpression value)
This function returns the specified value if none of the preceeding when() conditions are true.
|
PlanBuilder.AccessPlan |
fromLiterals(java.util.Map<java.lang.String,java.lang.Object>... rows)
Constructs a literal row set as in the SQL VALUES or SPARQL VALUES statements.
|
PlanBuilder.AccessPlan |
fromLiterals(java.util.Map<java.lang.String,java.lang.Object>[] rows,
java.lang.String qualifierName)
Constructs a literal row set as in the SQL VALUES or SPARQL VALUES statements.
|
PlanBuilder.AccessPlan |
fromLiterals(java.util.Map<java.lang.String,java.lang.Object>[] rows,
XsStringVal qualifierName)
Constructs a literal row set as in the SQL VALUES or SPARQL VALUES statements.
|
PlanBuilder.AccessPlan |
fromSearch(CtsQueryExpr query)
Supports document matching and relevance by constructing rows with the document fragment id and
columns for relevance factors.
|
PlanBuilder.AccessPlan |
fromSearch(CtsQueryExpr query,
PlanExprCol... columns)
Supports document matching and relevance by constructing rows with the document fragment id and
columns for relevance factors.
|
PlanBuilder.AccessPlan |
fromSearch(CtsQueryExpr query,
PlanExprColSeq columns,
java.lang.String qualifierName)
Supports document matching and relevance by constructing rows with the document fragment id and
columns for relevance factors.
|
PlanBuilder.AccessPlan |
fromSearch(CtsQueryExpr query,
PlanExprColSeq columns,
XsStringVal qualifierName,
PlanSearchOptions options)
Supports document matching and relevance by constructing rows with the document fragment id and
columns for relevance factors.
|
PlanBuilder.AccessPlan |
fromSearchDocs(CtsQueryExpr query)
Provides a convenience for matching documents and constructing rows with the score,
document uri, and document content.
|
PlanBuilder.AccessPlan |
fromSearchDocs(CtsQueryExpr query,
java.lang.String qualifierName)
Provides a convenience for matching documents and constructing rows with the score,
document uri, and document content.
|
PlanGroup |
group(java.lang.String... keys)
Specifies the keys for a group when grouping a row set in multiple ways
with
PlanBuilderBase.ModifyPlanBase.groupByUnion(PlanGroupSeq, PlanAggregateColSeq) . |
PlanAggregateCol |
groupConcat(PlanColumn name,
PlanExprCol column)
This function concatenates the non-null values of the column for the rows in the group or row set.
|
PlanAggregateCol |
groupConcat(PlanColumn name,
PlanExprCol column,
PlanGroupConcatOptionSeq options)
This function concatenates the non-null values of the column for the rows in the group or row set.
|
PlanAggregateCol |
groupConcat(java.lang.String name,
java.lang.String column)
This function concatenates the non-null values of the column for the rows in the group or row set.
|
PlanAggregateCol |
groupConcat(java.lang.String name,
java.lang.String column,
PlanGroupConcatOptionSeq options)
This function concatenates the non-null values of the column for the rows in the group or row set.
|
PlanGroupConcatOptionSeq |
groupConcatOptions(PlanValueOption option)
Specifies options for aggregating the values of a column for the rows
belonging to each group by concatenating the values into a single string value.
|
PlanGroupConcatOptionSeq |
groupConcatOptions(java.lang.String separator)
Specifies options for aggregating the values of a column for the rows
belonging to each group by concatenating the values into a single string value.
|
PlanGroupConcatOptionSeq |
groupConcatOptions(java.lang.String separator,
PlanValueOption option)
Specifies options for aggregating the values of a column for the rows
belonging to each group by concatenating the values into a single string value.
|
PlanGroupSeq |
groupSeq(PlanGroup... group)
Provides the sequence of groups when grouping a row set in multiple ways
with
PlanBuilderBase.ModifyPlanBase.groupByUnion(PlanGroupSeq, PlanAggregateColSeq) . |
ServerExpression |
jsonArray(ServerExpression... property)
This function constructs a JSON array during row processing.
|
ServerExpression |
jsonObject(PlanJsonProperty... property)
This function constructs a JSON object with the specified properties.
|
PlanNamedGroup |
namedGroup(java.lang.String name)
Specifies the name for a named group over all rows when grouping a row set in multiple ways
with
PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq) . |
PlanNamedGroup |
namedGroup(java.lang.String name,
PlanExprColSeq keys)
Specifies the name and keys for a named group when grouping a row set in multiple ways
with
PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq) . |
PlanNamedGroupSeq |
namedGroupSeq(PlanNamedGroup... namedGroup)
Provides the sequence of named groups when grouping a row set in multiple ways
with
PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq) . |
PlanFunction |
resolveFunction(XsQNameVal functionName,
java.lang.String modulePath)
Specifies a JavaScript or XQuery function installed on the server for use
in post-processing in a map() or reduce() operation.
|
PlanGroupSeq |
rollup(java.lang.String... keys)
Specifies the keys for a sequence of groups that provide a rollup for a row set.
|
PlanSampleByOptions |
sampleByOptions()
Provides a sample-by option object to configure the execution of the
PlanBuilder.sample(PlanColumn, PlanExprCol)
modifier for sampling a view, triples, or lexicon index. |
PlanSearchOptions |
searchOptions()
Provides a search options object to configure the execution of the
fromSearch(CtsQueryExpr, PlanExprColSeq, XsStringVal, PlanSearchOptions)
accessor. |
ServerExpression |
seq(ServerExpression... expression)
Collects a sequence of server expressions as a new server expression
for evaluation on the server.
|
PlanSparqlOptions |
sparqlOptions()
Provides a SPARQL option object to configure the execution of the
PlanBuilder.fromSparql(XsStringVal, XsStringVal, PlanSparqlOptions)
accessor. |
PlanBuilder.AccessPlan fromSearchDocs(CtsQueryExpr query)
fromSearch(CtsQueryExpr)
,
PlanBuilder.ModifyPlan.joinDocUri(String, String)
,
and PlanBuilder.ModifyPlan.joinDoc(String, String)
.
The documents can be ordered by the score and limited for the most relevant documents.
query
- The cts.query expression for matching the documents.PlanBuilder.AccessPlan fromSearchDocs(CtsQueryExpr query, java.lang.String qualifierName)
fromSearch(CtsQueryExpr)
,
PlanBuilder.ModifyPlan.joinDocUri(String, String)
,
and PlanBuilder.ModifyPlan.joinDoc(String, String)
.
The documents can be ordered by the score and limited for the most relevant documents.
query
- The cts.query expression for matching the documents.qualifierName
- Specifies a name for qualifying the column names similar to a view name.PlanBuilder.AccessPlan fromSearch(CtsQueryExpr query)
The documents can be ordered by the score or other relevance factors and limited for the most relevant documents.
By default, the rows provide fragmentId and score columns.
query
- The cts.query expression for matching the documents.PlanBuilder.AccessPlan fromSearch(CtsQueryExpr query, PlanExprCol... columns)
The documents can be ordered by the score or other relevance factors and limited for the most relevant documents.
The list of possible columns to project consists of fragmentId, confidence, fitness,
quality, and score. The columns other than the fragmentId provide the same relevance factors
as the cts.confidence(),
cts.fitness(),
cts.quality(),
and cts.score() functions
on the server. Pass PlanBuilder.as(String, ServerExpression)
to rename a column.
The default columns are fragmentId and score.
query
- The cts.query expression for matching the documents.columns
- The columns to project for the documents. See PlanBuilder.colSeq(String...)
PlanBuilder.AccessPlan fromSearch(CtsQueryExpr query, PlanExprColSeq columns, java.lang.String qualifierName)
The documents can be ordered by the score or other relevance factors and limited for the most relevant documents.
The list of possible columns to project consists of fragmentId, confidence, fitness,
quality, and score. The columns other than the fragmentId provide the same relevance factors
as the cts.confidence(),
cts.fitness(),
cts.quality(),
and cts.score() functions
on the server. Pass PlanBuilder.as(String, ServerExpression)
to rename a column.
The default columns are fragmentId and score.
query
- The cts.query expression for matching the documents.columns
- The columns to project for the documents. See PlanBuilder.colSeq(String...)
qualifierName
- Specifies a name for qualifying the column names similar to a view name.PlanBuilder.AccessPlan fromSearch(CtsQueryExpr query, PlanExprColSeq columns, XsStringVal qualifierName, PlanSearchOptions options)
The documents can be ordered by the score or other relevance factors and limited for the most relevant documents.
The list of possible columns to project consists of fragmentId, confidence, fitness,
quality, and score. The columns other than the fragmentId provide the same relevance factors
as the cts.confidence(),
cts.fitness(),
cts.quality(),
and cts.score() functions
on the server. Pass PlanBuilder.as(String, ServerExpression)
to rename a column.
The default columns are fragmentId and score.
query
- The cts.query expression for matching the documents.columns
- The columns to project for the documents. See PlanBuilder.colSeq(String...)
qualifierName
- Specifies a name for qualifying the column names similar to a view name.options
- Specifies how to calculate the score for the matching documents. See searchOptions()
PlanBuilder.AccessPlan fromLiterals(java.util.Map<java.lang.String,java.lang.Object>... rows)
rows
- This parameter provides any number of objects in which the key is a column name string identifying the column and the value is a literal with the value of the column.PlanBuilder.AccessPlan fromLiterals(java.util.Map<java.lang.String,java.lang.Object>[] rows, java.lang.String qualifierName)
rows
- This parameter is either an array of object literals or sem:binding objects in which the key is a column name string identifying the column and the value is a literal with the value of the column, or this parameter is an object with a columnNames key having a value of an array of column names and a rowValues key having a value of an array of arrays with literal values.qualifierName
- Specifies a name for qualifying the column names similar to a view namePlanBuilder.AccessPlan fromLiterals(java.util.Map<java.lang.String,java.lang.Object>[] rows, XsStringVal qualifierName)
rows
- This parameter is either an array of object literals or sem:binding objects in which the key is a column name string identifying the column and the value is a literal with the value of the column, or this parameter is an object with a columnNames key having a value of an array of column names and a rowValues key having a value of an array of arrays with literal values.qualifierName
- Specifies a name for qualifying the column names similar to a view nameServerExpression jsonObject(PlanJsonProperty... property)
Provides a client interface to a server function. See op:json-object
property
- The properties to be used to contruct the object. This is constructed by the op:prop function.ServerExpression jsonArray(ServerExpression... property)
Provides a client interface to a server function. See op:json-array
property
- The JSON nodes for the array.ServerExpression caseExpr(PlanCase... cases)
Provides a client interface to a server function. See op:case
cases
- One or more when or else expressions.PlanCase elseExpr(ServerExpression value)
value
- The value expression to returnPlanAggregateCol groupConcat(java.lang.String name, java.lang.String column)
name
- The name to be used for column with the concatenated values.column
- The name of the column with the values to be concatenated for the group.PlanAggregateCol groupConcat(PlanColumn name, PlanExprCol column)
name
- The name to be used for column with the concatenated values.column
- The name of the column with the values to be concatenated for the group.PlanAggregateCol groupConcat(java.lang.String name, java.lang.String column, PlanGroupConcatOptionSeq options)
name
- The name to be used for column with the concatenated values.column
- The name of the column with the values to be concatenated for the group.options
- The options can take a values key with a distinct value to average the distinct values of the column. In addition to the values key, the options can take a separator key specifying a separator character. The value can be a string or placeholder parameter. See groupConcatOptions(String, PlanValueOption)
PlanAggregateCol groupConcat(PlanColumn name, PlanExprCol column, PlanGroupConcatOptionSeq options)
name
- The name to be used for column with the concatenated values.column
- The name of the column with the values to be concatenated for the group.options
- The options can take a values key with a distinct value to average the distinct values of the column. In addition to the values key, the options can take a separator key specifying a separator character. The value can be a string or placeholder parameter. See groupConcatOptions(String, PlanValueOption)
PlanGroupConcatOptionSeq groupConcatOptions(java.lang.String separator)
separator
- a string for separating the valuesPlanGroupConcatOptionSeq groupConcatOptions(PlanValueOption option)
option
- an option controlling whether to concatenate all values including duplicates or concatenate distinct valuesPlanGroupConcatOptionSeq groupConcatOptions(java.lang.String separator, PlanValueOption option)
separator
- a string for separating the valuesoption
- an option controlling whether to concatenate all values including duplicates or concatenate distinct valuesPlanGroup group(java.lang.String... keys)
PlanBuilderBase.ModifyPlanBase.groupByUnion(PlanGroupSeq, PlanAggregateColSeq)
.
Omit the keys to group over all rows.keys
- the columns, if any, in the groupPlanGroupSeq rollup(java.lang.String... keys)
PlanBuilderBase.ModifyPlanBase.groupByUnion(PlanGroupSeq, PlanAggregateColSeq)
or PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq)
.keys
- the columns in the rollupPlanGroupSeq cube(java.lang.String... keys)
PlanBuilderBase.ModifyPlanBase.groupByUnion(PlanGroupSeq, PlanAggregateColSeq)
or PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq)
.keys
- the columns in the cubePlanGroupSeq groupSeq(PlanGroup... group)
PlanBuilderBase.ModifyPlanBase.groupByUnion(PlanGroupSeq, PlanAggregateColSeq)
.
Each group must provide a unique set of key columns, but a key column can appear
in multiple groupsgroup
- the groups to apply to the row setPlanNamedGroup namedGroup(java.lang.String name)
PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq)
.name
- the name of the array for the groupPlanNamedGroup namedGroup(java.lang.String name, PlanExprColSeq keys)
PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq)
.name
- the name of the array for the groupkeys
- the columns, if any, in the group. See PlanBuilder.colSeq(String...)
PlanNamedGroupSeq namedGroupSeq(PlanNamedGroup... namedGroup)
PlanBuilderBase.ModifyPlanBase.groupToArrays(PlanNamedGroupSeq, PlanAggregateColSeq)
.
Each group must provide a unique set of key columns, but a key column can appear
in multiple groups. Names are assigned to groups without a name; if supplied,
the group name must be unique.namedGroup
- the named groups to apply to the row setPlanSearchOptions searchOptions()
fromSearch(CtsQueryExpr, PlanExprColSeq, XsStringVal, PlanSearchOptions)
accessor. Use the fluent methods of the search options object
to set the configuration.PlanSampleByOptions sampleByOptions()
PlanBuilder.sample(PlanColumn, PlanExprCol)
modifier for sampling a view, triples, or lexicon index. Use the fluent methods of the sample-by option object
to set the configuration.PlanSparqlOptions sparqlOptions()
PlanBuilder.fromSparql(XsStringVal, XsStringVal, PlanSparqlOptions)
accessor. Use the fluent methods of the sample-by option object
to set the configuration.PlanFunction resolveFunction(XsQNameVal functionName, java.lang.String modulePath)
functionName
- the name of the function installed on the servermodulePath
- the path on the server for the library module providing the functionServerExpression seq(ServerExpression... expression)
XsValue
class provides methods for constructing sequences
of literals values such as XsValue.dateSeq(String...)
. These
sequences can be passed to any parameter with a ServerExpression type
as well as to the seq() function.expression
- one or more server expressionsXsValue.doubleSeq(double...)
,
XsValue.intSeq(int...)
,
XsValue.stringSeq(String...)
Copyright © 2013-2021 MarkLogic Corporation.