Interface LuceneOperations
- All Known Subinterfaces:
ProjectingLuceneOperations
- All Known Implementing Classes:
LuceneAccessor
,LuceneAccessorSupport
,LuceneOperationsSupport
,LuceneTemplate
,ProjectingLuceneAccessor
,ProjectingLuceneAccessorSupport
,ProjectingLuceneOperationsSupport
,ProjectingLuceneTemplate
public interface LuceneOperations
The
LuceneOperations
interface defines a contract for implementations defining data access operations
using Lucene queries.- Since:
- 1.1.0
- Author:
- John Blum
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptiondefault <K,
V> List<LuceneResultStruct<K, V>> Executes the given Lucenequery
.<K,
V> List<LuceneResultStruct<K, V>> Executes the given Lucenequery
with a limit on the number of results returned.<K,
V> PageableLuceneQueryResults<K, V> Executes the given Lucenequery
with a limit on the number of results returned along with a page size for paging.default <K,
V> List<LuceneResultStruct<K, V>> query
(LuceneQueryProvider queryProvider) Executes the given Lucenequery
.<K,
V> List<LuceneResultStruct<K, V>> query
(LuceneQueryProvider queryProvider, int resultLimit) Executes the given Lucenequery
with a limit on the number of results returned.<K,
V> PageableLuceneQueryResults<K, V> query
(LuceneQueryProvider queryProvider, int resultLimit, int pageSize) Executes the given Lucenequery
with a limit on the number of results returned along with a page size for paging.default <K> Collection<K>
queryForKeys
(String query, String defaultField) Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate.<K> Collection<K>
queryForKeys
(String query, String defaultField, int resultLimit) Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate with a limit on the number of keys returned.default <K> Collection<K>
queryForKeys
(LuceneQueryProvider queryProvider) Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate.<K> Collection<K>
queryForKeys
(LuceneQueryProvider queryProvider, int resultLimit) Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate with a limit on the number of keys returned.default <V> Collection<V>
queryForValues
(String query, String defaultField) Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate.<V> Collection<V>
queryForValues
(String query, String defaultField, int resultLimit) Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate.default <V> Collection<V>
queryForValues
(LuceneQueryProvider queryProvider) Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate.<V> Collection<V>
queryForValues
(LuceneQueryProvider queryProvider, int resultLimit) Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate.
-
Field Details
-
DEFAULT_PAGE_SIZE
static final int DEFAULT_PAGE_SIZE- See Also:
-
DEFAULT_RESULT_LIMIT
static final int DEFAULT_RESULT_LIMIT- See Also:
-
-
Method Details
-
query
Executes the given Lucenequery
.- Type Parameters:
K
-Class
type of the key.V
-Class
type of the value.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.- Returns:
- a
List
ofLuceneResultStruct
containing the query results. - See Also:
-
query
Executes the given Lucenequery
with a limit on the number of results returned.- Type Parameters:
K
-Class
type of the key.V
-Class
type of the value.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.resultLimit
- limit on the number of query results to return.- Returns:
- a
List
ofLuceneResultStruct
containing the query results. - See Also:
-
query
<K,V> PageableLuceneQueryResults<K,V> query(String query, String defaultField, int resultLimit, int pageSize) Executes the given Lucenequery
with a limit on the number of results returned along with a page size for paging.- Type Parameters:
K
-Class
type of the key.V
-Class
type of the value.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.resultLimit
- limit on the number of query results to return.pageSize
- number of results per page.- Returns:
- a
PageableLuceneQueryResults
data structure containing the results of the Lucene query. - See Also:
-
query
Executes the given Lucenequery
.- Type Parameters:
K
-Class
type of the key.V
-Class
type of the value.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.- Returns:
- a
List
ofLuceneResultStruct
containing the query results. - See Also:
-
query
Executes the given Lucenequery
with a limit on the number of results returned.- Type Parameters:
K
-Class
type of the key.V
-Class
type of the value.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.resultLimit
- limit on the number of query results to return.- Returns:
- a
List
ofLuceneResultStruct
containing the query results. - See Also:
-
query
<K,V> PageableLuceneQueryResults<K,V> query(LuceneQueryProvider queryProvider, int resultLimit, int pageSize) Executes the given Lucenequery
with a limit on the number of results returned along with a page size for paging.- Type Parameters:
K
-Class
type of the key.V
-Class
type of the value.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.resultLimit
- limit on the number of query results to return.pageSize
- number of results per page.- Returns:
- a
PageableLuceneQueryResults
data structure containing the results of the Lucene query. - See Also:
-
queryForKeys
Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate. The number of keys returned is limited byLuceneQueryFactory.DEFAULT_LIMIT
.- Type Parameters:
K
-Class
type of the key.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.- Returns:
- a
Collection
of keys matching the Lucene query clause (predicate). - See Also:
-
queryForKeys
Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate with a limit on the number of keys returned.- Type Parameters:
K
-Class
type of the key.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.resultLimit
- limit on the number of keys returned.- Returns:
- a
Collection
of keys matching the Lucene query clause (predicate). - See Also:
-
queryForKeys
Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate. The number of keys returned is limited byLuceneQueryFactory.DEFAULT_LIMIT
.- Type Parameters:
K
-Class
type of the key.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.- Returns:
- a
Collection
of keys matching the Lucene query clause (predicate). - See Also:
-
queryForKeys
Executes the given Lucenequery
returning aCollection
of keys matching the query clause/predicate with a limit on the number of keys returned.- Type Parameters:
K
-Class
type of the key.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.resultLimit
- limit on the number of keys returned.- Returns:
- a
Collection
of keys matching the Lucene query clause (predicate). - See Also:
-
queryForValues
Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate. The number of values returned is limited byLuceneQueryFactory.DEFAULT_LIMIT
.- Type Parameters:
V
-Class
type of the value.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.- Returns:
- a
Collection
of values matching Lucene query clause (predicate). - See Also:
-
queryForValues
Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate.- Type Parameters:
V
-Class
type of the value.- Parameters:
query
-String
containing the Lucene query to execute.defaultField
-String
specifying the default field used in Lucene queries when a field is not explicitly defined in the Lucene query clause.resultLimit
- limit on the number of values returned.- Returns:
- a
Collection
of values matching Lucene query clause (predicate). - See Also:
-
queryForValues
Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate. The number of values returned is limited byLuceneQueryFactory.DEFAULT_LIMIT
.- Type Parameters:
V
-Class
type of the value.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.- Returns:
- a
Collection
of values matching Lucene query clause (predicate). - See Also:
-
queryForValues
Executes the given Lucenequery
returning aCollection
of values matching the query clause/predicate.- Type Parameters:
V
-Class
type of the value.- Parameters:
queryProvider
-LuceneQueryProvider
is a provider implementation supplying the Lucene query to execute as well as de/serialize to distribute across the cluster.resultLimit
- limit on the number of values returned.- Returns:
- a
Collection
of values matching Lucene query clause (predicate). - See Also:
-