public abstract class QueryBase extends Object implements Query, SimilarToGraphQuery
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryBase.HasContainer |
static class |
QueryBase.HasNotPropertyContainer |
static class |
QueryBase.HasPropertyContainer |
static class |
QueryBase.HasValueContainer |
static class |
QueryBase.SortContainer |
| Modifier | Constructor and Description |
|---|---|
protected |
QueryBase(Graph graph,
String[] similarToFields,
String similarToText,
Authorizations authorizations) |
protected |
QueryBase(Graph graph,
String queryString,
Authorizations authorizations) |
| Modifier and Type | Method and Description |
|---|---|
Query |
addAggregation(Aggregation aggregation)
Add an aggregation to the query
|
SimilarToGraphQuery |
boost(float boost)
The amount of boost to apply to the similarity query.
|
QueryResultsIterable<Edge> |
edges() |
abstract QueryResultsIterable<Edge> |
edges(EnumSet<FetchHint> fetchHints) |
QueryResultsIterable<Edge> |
edges(String label)
Deprecated.
|
QueryResultsIterable<Edge> |
edges(String label,
EnumSet<FetchHint> fetchHints)
Deprecated.
|
QueryResultsIterable<Element> |
elements() |
QueryResultsIterable<Element> |
elements(EnumSet<FetchHint> fetchHints) |
Aggregation |
getAggregationByName(String aggregationName) |
Collection<Aggregation> |
getAggregations()
Gets the added aggregations
|
Graph |
getGraph() |
QueryParameters |
getParameters() |
Query |
has(String propertyName)
Adds a has filter to the query.
|
<T> Query |
has(String propertyName,
Predicate predicate,
T value)
Adds a filter to the query.
|
<T> Query |
has(String propertyName,
T value)
Adds an
Compare.EQUAL filter to the query. |
<T> Query |
hasEdgeLabel(Collection<String> edgeLabels)
Adds a edge label filter to the query.
|
<T> Query |
hasEdgeLabel(String... edgeLabels)
Adds a edge label filter to the query.
|
Query |
hasNot(String propertyName)
Adds a hasNot filter to the query.
|
<T> Query |
hasNot(String propertyName,
T value)
Adds an
Contains.NOT_IN filter to the query. |
boolean |
isAggregationSupported(Aggregation aggregation)
Test to see if aggregation is supported.
|
Query |
limit(Integer count)
Limits the number of items returned.
|
Query |
limit(Long count)
Limits the number of items returned.
|
SimilarToGraphQuery |
maxDocFrequency(int maxDocFrequency)
The maximum number of documents a term can be in to be considered for a similarity match.
|
SimilarToGraphQuery |
maxQueryTerms(int maxQueryTerms)
The maximum number of terms to be searched for.
|
SimilarToGraphQuery |
minDocFrequency(int minDocFrequency)
The minimum number of documents a term must be in to be considered for a similarity match.
|
SimilarToGraphQuery |
minTermFrequency(int minTermFrequency)
The minimum number of times a term must appear in the source data to be considered for a match.
|
SimilarToGraphQuery |
percentTermsToMatch(float percentTermsToMatch)
The percentage of terms that must match to be considered similar.
|
<T> Query |
range(String propertyName,
T startValue,
boolean inclusiveStartValue,
T endValue,
boolean inclusiveEndValue)
Queries for properties in the given range.
|
<T> Query |
range(String propertyName,
T startValue,
T endValue)
Queries for properties in the given range.
|
Query |
skip(int count)
Skips the given number of items.
|
Query |
sort(String propertyName,
SortDirection direction)
Sort the results by the given property name.
|
QueryResultsIterable<Vertex> |
vertices() |
abstract QueryResultsIterable<Vertex> |
vertices(EnumSet<FetchHint> fetchHints) |
protected QueryBase(Graph graph, String queryString, Authorizations authorizations)
protected QueryBase(Graph graph, String[] similarToFields, String similarToText, Authorizations authorizations)
public QueryResultsIterable<Vertex> vertices()
public abstract QueryResultsIterable<Vertex> vertices(EnumSet<FetchHint> fetchHints)
public QueryResultsIterable<Edge> edges()
public abstract QueryResultsIterable<Edge> edges(EnumSet<FetchHint> fetchHints)
public <T> Query hasEdgeLabel(String... edgeLabels)
QueryhasEdgeLabel in interface QueryedgeLabels - The edge labels to filter on.public <T> Query hasEdgeLabel(Collection<String> edgeLabels)
QueryhasEdgeLabel in interface QueryedgeLabels - The edge labels to filter on.@Deprecated public QueryResultsIterable<Edge> edges(String label, EnumSet<FetchHint> fetchHints)
@Deprecated public QueryResultsIterable<Edge> edges(String label)
public QueryResultsIterable<Element> elements()
public QueryResultsIterable<Element> elements(EnumSet<FetchHint> fetchHints)
public <T> Query range(String propertyName, T startValue, T endValue)
Querypublic <T> Query range(String propertyName, T startValue, boolean inclusiveStartValue, T endValue, boolean inclusiveEndValue)
Querypublic Query sort(String propertyName, SortDirection direction)
Querypublic <T> Query has(String propertyName, T value)
QueryCompare.EQUAL filter to the query.public <T> Query hasNot(String propertyName, T value)
QueryContains.NOT_IN filter to the query.public <T> Query has(String propertyName, Predicate predicate, T value)
Queryhas in interface QuerypropertyName - The name of the property to query on.predicate - One of Compare,
TextPredicate,
or GeoCompare.value - The value of the property to query for.public Query has(String propertyName)
Querypublic Query hasNot(String propertyName)
Querypublic Query skip(int count)
Querypublic Query limit(Integer count)
Querypublic Query limit(Long count)
Querypublic Graph getGraph()
public QueryParameters getParameters()
public SimilarToGraphQuery minTermFrequency(int minTermFrequency)
SimilarToGraphQueryminTermFrequency in interface SimilarToGraphQuerypublic SimilarToGraphQuery maxQueryTerms(int maxQueryTerms)
SimilarToGraphQuerymaxQueryTerms in interface SimilarToGraphQuerypublic SimilarToGraphQuery minDocFrequency(int minDocFrequency)
SimilarToGraphQueryminDocFrequency in interface SimilarToGraphQuerypublic SimilarToGraphQuery maxDocFrequency(int maxDocFrequency)
SimilarToGraphQuerymaxDocFrequency in interface SimilarToGraphQuerypublic SimilarToGraphQuery percentTermsToMatch(float percentTermsToMatch)
SimilarToGraphQuerypercentTermsToMatch in interface SimilarToGraphQuerypublic SimilarToGraphQuery boost(float boost)
SimilarToGraphQueryboost in interface SimilarToGraphQuerypublic boolean isAggregationSupported(Aggregation aggregation)
QueryisAggregationSupported in interface Queryaggregation - the aggregation to test.public Query addAggregation(Aggregation aggregation)
QueryaddAggregation in interface Queryaggregation - the aggregation to add.public Collection<Aggregation> getAggregations()
QuerygetAggregations in interface Querypublic Aggregation getAggregationByName(String aggregationName)
Copyright © 2014–2017. All rights reserved.