public final class TextQuery<K,V> extends Query<javax.cache.Cache.Entry<K,V>>
QueryTextField
'Employee'
class defined as follows:
public class Person { private long id; private String name; // Index for text search. @QueryTextField private String resume; ... }Here is a possible query that will use Lucene text search to scan all resumes to check if employees have
Master
degree:
Query<Cache.Entry<Long, Person>> qry = new TextQuery(Person.class, "Master"); // Query all cache nodes. cache.query(qry).getAll();
IgniteCache.query(Query)
,
Serialized FormDFLT_PAGE_SIZE
Constructor and Description |
---|
TextQuery(Class<?> type,
String txt)
Constructs query for the given search string.
|
TextQuery(String type,
String txt)
Constructs query for the given search string.
|
Modifier and Type | Method and Description |
---|---|
String |
getText()
Gets text search string.
|
String |
getType()
Gets type for query.
|
TextQuery<K,V> |
setLocal(boolean loc)
Sets whether this query should be executed on local node only.
|
TextQuery<K,V> |
setPageSize(int pageSize)
Sets optional page size, if
0 , then default is used. |
TextQuery<K,V> |
setText(String txt)
Sets text search string.
|
TextQuery<K,V> |
setType(Class<?> type)
Sets type for query.
|
TextQuery<K,V> |
setType(String type)
Sets type for query.
|
String |
toString() |
getPageSize, isLocal, prepare
public TextQuery(String type, String txt)
type
- Type.txt
- Search string.public String getType()
public TextQuery<K,V> setType(Class<?> type)
type
- Type.this
For chaining.public TextQuery<K,V> setType(String type)
type
- Type.this
For chaining.public String getText()
public TextQuery<K,V> setText(String txt)
txt
- Text search string.this
For chaining.public TextQuery<K,V> setPageSize(int pageSize)
0
, then default is used.setPageSize
in class Query<javax.cache.Cache.Entry<K,V>>
pageSize
- Optional page size.this
for chaining.public TextQuery<K,V> setLocal(boolean loc)
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024