# Class: QueryIndex

## QueryIndex(nameopt, typeNameopt)

Class representing one Query Index element of QueryEntity of Ignite CacheConfiguration.

All configuration settings are optional and have defaults which are defined on a server side.

See Apache Ignite documentation for details of every configuration setting.

## Constructor

#### new QueryIndex(nameopt, typeNameopt)

Public constructor.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`name` | string | <optional> | null |
`typeName` | string | <optional> | QueryIndex.INDEX_TYPE.SORTED |

Source:
  - CacheConfiguration.js, line 652

### Members

#### (static, readonly) INDEX_TYPE

##### Properties:

Name | Type | Description
--- | --- | ---
`SORTED` |  | 0
`FULLTEXT` |  | 1
`GEOSPATIAL` |  | 2

Source:
  - CacheConfiguration.js, line 630

### Methods

#### getFields() → {Map.<string, boolean>}

Source:
  - CacheConfiguration.js, line 756

##### Returns:

Type
  Map.<string, boolean>

#### getInlineSize() → {number}

Source:
  - CacheConfiguration.js, line 735

##### Returns:

Type
  number

#### getName() → {string}

Source:
  - CacheConfiguration.js, line 690

##### Returns:

Type
  string

#### getType() → {QueryIndex.INDEX_TYPE}

Source:
  - CacheConfiguration.js, line 714

##### Returns:

Type
  QueryIndex.INDEX_TYPE

#### setFields(fields) → {QueryIndex}

##### Parameters:

Name | Type | Description
--- | --- | ---
`fields` | Map.<string, boolean> |

Source:
  - CacheConfiguration.js, line 746

##### Returns:

- the same instance of the QueryIndex.

Type
  QueryIndex

#### setInlineSize(inlineSize) → {QueryIndex}

##### Parameters:

Name | Type | Description
--- | --- | ---
`inlineSize` | number |

Source:
  - CacheConfiguration.js, line 725

##### Returns:

- the same instance of the QueryIndex.

Type
  QueryIndex

#### setName(name) → {QueryIndex}

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | string |

Source:
  - CacheConfiguration.js, line 680

##### Returns:

- the same instance of the QueryIndex.

Type
  QueryIndex

#### setType(type) → {QueryIndex}

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | QueryIndex.INDEX_TYPE |

Source:
  - CacheConfiguration.js, line 703

##### Throws:

if error.

Type
  IgniteClientError

##### Returns:

- the same instance of the QueryIndex.

Type
  QueryIndex