org.apache.ignite.cache.query

## Class TextQuery<K,V>

- java.lang.Object
- - org.apache.ignite.cache.query.Query<javax.cache.Cache.Entry<K,V>>
  - - org.apache.ignite.cache.query.TextQuery<K,V>

All Implemented Interfaces:
  Serializable

    public final class TextQuery<K,V>
    extends Query<javax.cache.Cache.Entry<K,V>>

Query for Lucene based fulltext search.

See Also:
  `IgniteCache.query(Query)`, Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.cache.query.Query

`DFLT_PAGE_SIZE`

### Constructor Summary

Constructors
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.

### Method Summary

Methods
`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()`

### Methods inherited from class org.apache.ignite.cache.query.Query

`getPageSize, isLocal`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### TextQuery

    public TextQuery(String type,
             String txt)

Constructs query for the given search string.

Parameters:
  `type` - Type.
  `txt` - Search string.

#### TextQuery

    public TextQuery(Class<?> type,
             String txt)

Constructs query for the given search string.

Parameters:
  `type` - Type.
  `txt` - Search string.

### Method Detail

#### getType

    public String getType()

Gets type for query.

Returns:
  Type.

#### setType

    public TextQuery<K,V> setType(Class<?> type)

Sets type for query.

Parameters:
  `type` - Type.
Returns:
  `this` For chaining.

#### setType

    public TextQuery<K,V> setType(String type)

Sets type for query.

Parameters:
  `type` - Type.
Returns:
  `this` For chaining.

#### getText

    public String getText()

Gets text search string.

Returns:
  Text search string.

#### setText

    public TextQuery<K,V> setText(String txt)

Sets text search string.

Parameters:
  `txt` - Text search string.
Returns:
  `this` For chaining.

#### setPageSize

    public TextQuery<K,V> setPageSize(int pageSize)

Sets optional page size, if `0`, then default is used.

Overrides:
  `setPageSize` in class `Query<javax.cache.Cache.Entry<K,V>>`
Parameters:
  `pageSize` - Optional page size.
Returns:
  `this` for chaining.

#### setLocal

    public TextQuery<K,V> setLocal(boolean loc)

Sets whether this query should be executed on local node only.

Overrides:
  `setLocal` in class `Query<javax.cache.Cache.Entry<K,V>>`
Parameters:
  `loc` - Local flag.
Returns:
  `this` for chaining.

#### toString

    public String toString()

Overrides:
  `toString` in class `Query<javax.cache.Cache.Entry<K,V>>`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0
Release Date | : March 31 2015