Package org.eclipse.rdf4j.sail.lucene
Class QuerySpec
java.lang.Object
org.eclipse.rdf4j.sail.lucene.AbstractSearchQueryEvaluator
org.eclipse.rdf4j.sail.lucene.QuerySpec
- All Implemented Interfaces:
SearchQueryEvaluator
A QuerySpec holds information extracted from a TupleExpr corresponding with a single Lucene query. Access the
patterns or use the get-methods to get the names of the variables to bind.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StatementPattern
private final StatementPattern
private final String
private final Collection
<QuerySpec.QueryParam> private final StatementPattern
private final String
private final Resource
private final StatementPattern
-
Constructor Summary
ConstructorsConstructorDescriptionQuerySpec
(String matchesVarName, String propertyVarName, String scoreVarName, String snippetVarName, Resource subject, String queryString, IRI propertyURI) QuerySpec
(StatementPattern matchesPattern, Collection<QuerySpec.QueryParam> queryPatterns, StatementPattern scorePattern, StatementPattern typePattern, StatementPattern idPattern, Resource subject) -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
append
(StatementPattern pattern, StringBuilder buffer) private static void
append
(Var var, StringBuilder buffer) return the name of the bound variable that should match the querythe type of query, must equalLuceneSailSchema.LUCENE_QUERY
.The variable name associated with the query scoreboolean
boolean
Removes the query patterns and returns a placeholder where the query results could be placed.private static void
replace
(QueryModelNode pattern, Supplier<? extends QueryModelNode> replacement) Replace the given pattern with a new instance of the given replacement type.toString()
Methods inherited from class org.eclipse.rdf4j.sail.lucene.AbstractSearchQueryEvaluator
replaceQueryPatternsWithResults
-
Field Details
-
matchesPattern
-
queryPatterns
-
scorePattern
-
typePattern
-
idPattern
-
subject
-
matchesVarName
-
scoreVarName
-
-
Constructor Details
-
QuerySpec
public QuerySpec(StatementPattern matchesPattern, Collection<QuerySpec.QueryParam> queryPatterns, StatementPattern scorePattern, StatementPattern typePattern, StatementPattern idPattern, Resource subject) -
QuerySpec
-
-
Method Details
-
replace
Replace the given pattern with a new instance of the given replacement type.- Parameters:
pattern
- the pattern to removereplacement
- the replacement type
-
append
-
append
-
getParentQueryModelNode
-
removeQueryPatterns
Description copied from interface:SearchQueryEvaluator
Removes the query patterns and returns a placeholder where the query results could be placed. -
getMatchesPattern
-
getMatchesVariableName
return the name of the bound variable that should match the query- Returns:
- the name of the variable or null, if no name set
-
getQueryPatterns
-
getIdPattern
-
getScorePattern
-
getScoreVariableName
The variable name associated with the query score- Returns:
- the name or null, if no score is queried in the pattern
-
getTypePattern
-
getQueryType
the type of query, must equalLuceneSailSchema.LUCENE_QUERY
. A null type is possible, but not valid.- Returns:
- the type of the Query or null, if no type assigned.
-
getSubject
-
isEvaluable
public boolean isEvaluable() -
isHighlight
public boolean isHighlight() -
toString
-
getCatQuery
-