@Deprecated public class QueryContext extends Object
ReadableIndex.query(Object) and ReadableIndex.query(String, Object).
It allows a query to have sorting, default operators, and allows the engine
to turn off searching of modifications made inside a transaction,
to gain performance.| Constructor and Description |
|---|
QueryContext(Object queryOrQueryObject)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
QueryContext |
defaultOperator(org.apache.lucene.queryparser.classic.QueryParser.Operator defaultOperator)
Deprecated.
|
org.apache.lucene.queryparser.classic.QueryParser.Operator |
getDefaultOperator()
Deprecated.
|
Object |
getQueryOrQueryObject()
Deprecated.
|
org.apache.lucene.search.Sort |
getSorting()
Deprecated.
|
int |
getTop()
Deprecated.
|
boolean |
getTradeCorrectnessForSpeed()
Deprecated.
|
static QueryContext |
numericRange(String key,
Number from,
Number to)
Deprecated.
|
static QueryContext |
numericRange(String key,
Number from,
Number to,
boolean includeFrom,
boolean includeTo)
Deprecated.
|
QueryContext |
sort(org.apache.lucene.search.Sort sorting)
Deprecated.
|
QueryContext |
sort(String key,
String... additionalKeys)
Deprecated.
|
QueryContext |
sortByScore()
Deprecated.
|
QueryContext |
sortNumeric(String key,
boolean reversed)
Deprecated.
|
QueryContext |
top(int numberOfTopHits)
Deprecated.
|
QueryContext |
tradeCorrectnessForSpeed()
Deprecated.
|
@Deprecated public QueryContext(Object queryOrQueryObject)
@Deprecated public Object getQueryOrQueryObject()
@Deprecated public QueryContext sort(org.apache.lucene.search.Sort sorting)
sorting - The sorting to be used@Deprecated public QueryContext sort(String key, String... additionalKeys)
key - The key to sort on.additionalKeys - Any additional keys to sort on.@Deprecated public QueryContext sortByScore()
@Deprecated public QueryContext sortNumeric(String key, boolean reversed)
NumericRangeQuery, see numericRange(String, Number, Number),
Otherwise an IllegalStateException will be thrown.key - the key to sort on.reversed - if the sort order should be reversed or not. true
for lowest first (ascending), false for highest first (descending)@Deprecated public org.apache.lucene.search.Sort getSorting()
sort(Sort) or sortByScore()@Deprecated public QueryContext defaultOperator(org.apache.lucene.queryparser.classic.QueryParser.Operator defaultOperator)
defaultOperator - The new operator to use.@Deprecated public org.apache.lucene.queryparser.classic.QueryParser.Operator getDefaultOperator()
QueryParser.Operator specified with
defaultOperator or "OR" if none specified.@Deprecated public QueryContext tradeCorrectnessForSpeed()
@Deprecated public boolean getTradeCorrectnessForSpeed()
true if this context is set to prioritize speed over
the inclusion of transactional state in the results.tradeCorrectnessForSpeed() has been called.@Deprecated public QueryContext top(int numberOfTopHits)
IndexSearcher.search(org.apache.lucene.search.Query, int),
alternatively IndexSearcher.search(org.apache.lucene.search.Query, org.apache.lucene.search.Filter, int, Sort)
where only the top numberOfTopHits hits are returned. Default
behavior is to return all hits, although lazily retrieved from lucene all
the way up to the IndexHits iterator.numberOfTopHits - the maximum number of top hits to return.QueryContext with the number of top hits set.@Deprecated public int getTop()
top(int).@Deprecated public static QueryContext numericRange(String key, Number from, Number to)
QueryContext with a query for numeric ranges, that is
values that have been indexed using ValueContext.indexNumeric().
from (lower) and to (higher) bounds are inclusive.
It will match the type of numbers supplied to the type of values that
are indexed in the index, f.ex. long, int, float and double.
If both from and to is null then it will default
to int.key - the property key to query.from - the low end of the range (inclusive)to - the high end of the range (inclusive)QueryContext to do numeric range queries with.@Deprecated public static QueryContext numericRange(String key, Number from, Number to, boolean includeFrom, boolean includeTo)
QueryContext with a query for numeric ranges, that is
values that have been indexed using ValueContext.indexNumeric().
It will match the type of numbers supplied to the type of values that
are indexed in the index, f.ex. long, int, float and double.
If both from and to is null then it will default
to int.key - the property key to query.from - the low end of the range (inclusive)to - the high end of the range (inclusive)includeFrom - whether or not from (the lower bound) is inclusive
or not.includeTo - whether or not to (the higher bound) is inclusive
or not.QueryContext to do numeric range queries with.Copyright © 2002–2018 The Neo4j Graph Database Project. All rights reserved.