YouTrack InCloud 2018.3 Help

Text Index Settings

This resource lets you read and manage the text index settings of your service.

Resource

api/admin/textIndexSettings

Returned entity

TextIndexSettings. For the description of the entity attributes, see the Supported Fields section.

Supported methods

Supported Fields

This table describes attributes of the TextIndexSettings entity.

  • To receive an attribute in the response from server, specify it explicitly in the fields parameter of a request.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

documentsToIndex

Int

A number of documents that are

indexingInProgress

Boolean

Indicates the current state of text indexing. When true, the text index is currently in progress. Otherwise, the text index is built. To rebuild the index, send a POST request with this field set to true.

languages

List<TextIndexLanguage>

A collection of text index languages.

suspended

Boolean

State of text indexing.

id

String

The ID of the returned entity.

Read Text Index Settings

Get text index settings of the service.

Request syntax

GET /api/admin/textIndexSettings?[fields]&{$skip}&{$top}

Request parameters:

Parameter

Type

Description

fields

string

A list of TextIndexSettings fields that should be returned in the response. If no fields specified, only the entity ID is returned.

$skip

int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

int

Optional. Lets you specify the maximum number of entries that are returned in the response.

Sample request

curl -X GET \ 'https://example.myjetbrains.com/youtrack/api/admin/textIndexSettings?fields=documentsToIndex,indexingInProgress,languages%28active,disabled,id%29,id' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json'

Sample response body

{ "languages": [ { "id": "English", "active": true, "disabled": true }, { "id": "Français", "active": true, "disabled": false }, { "id": "Italiano", "active": false, "disabled": false }, { "id": "Русский", "active": true, "disabled": false }, { "id": "Nederlands", "active": false, "disabled": false }, { "id": "Svenskt", "active": false, "disabled": false }, { "id": "Norske", "active": false, "disabled": false }, { "id": "ελληνικά", "active": false, "disabled": false }, { "id": "Türk", "active": false, "disabled": false }, { "id": "Deutsch", "active": true, "disabled": false }, { "id": "Español", "active": true, "disabled": false }, { "id": "Português", "active": false, "disabled": false }, { "id": "Český", "active": false, "disabled": false }, { "id": "Polskie", "active": false, "disabled": false }, { "id": "Dansk", "active": false, "disabled": false }, { "id": "Suomi", "active": false, "disabled": false }, { "id": "Latvijas", "active": false, "disabled": false }, { "id": "العربية", "active": false, "disabled": false }, { "id": "中文", "active": false, "disabled": false }, { "id": "日本語", "active": false, "disabled": false }, { "id": "한국어", "active": false, "disabled": false } ], "documentsToIndex": 0, "indexingInProgress": false, "id": "61-0" }

Update Text Index Settings

Update text index settings: toggle on/off indexing of languages, rebuild the text index, suspend or re-enable it.

Request syntax

POST /api/admin/textIndexSettings?[fields]

Request parameters:

Parameter

Type

Description

fields

string

A list of issue fields that should be returned in the response. If no fields specified, only issue ID is returned.

Sample request

To deactivate indexing for a language, send a POST request like the one follows.

curl -X POST \ https://example.myjetbrains.com/youtrack/api/admin/textIndexSettings \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 34b71372-cad6-4d73-9a38-cfd47fff29aa' \ -d '{ "languages": [{ "id": "Deutsch", "active": false }] }'

Sample response body

{ "id": "76-0" }

Sample request

This sample request initiates rebuilding of the text index.

curl -X POST \ 'https://example.myjetbrains.com/youtrack/api/admin/textIndexSettings?fields=documentsToIndex,indexingInProgress' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer perm:am9obi5kb2U=.UG9zdG1hbiBKb2huIERvZQ==.jJe0eYhhkV271j1lCpfknNYOEakNk7' \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -d '{"suspended": false,"indexingInProgress": true}'

Sample response body

{ "documentsToIndex": 1, "indexingInProgress": true }
Last modified: 12 October 2018