suo
API reference

Settings

GET and PUT /1/indexes/:index/settings — index-time and query-time configuration.

GET  /1/indexes/:index/settings
PUT  /1/indexes/:index/settings

GET works with any key type for that index. PUT requires a write or admin key.

Shape

type IndexSettings = {
	indexTime: IndexTimeSettings;
	queryTime: QueryTimeSettings;
};

type IndexTimeSettings = {
	searchableTiers: { attributes: string[]; typoTolerance: boolean }[];
	attributesForFaceting: string[];
	languages: string[];
	dictionary: string[];
	partitionKey: string | null;
};

type QueryTimeSettings = {
	customRanking: { attribute: string; order: 'asc' | 'desc' }[];
	synonyms: SynonymRule[];
	pins: PinRule[];
	hides: HideRule[];
	typoTolerance: boolean;
	ignorePlurals: boolean;
	removeWordsIfNoResults: 'none' | 'lastWords';
	distinctAttribute: string | null;
	queryLogging: boolean;
};

See Index-time vs query-time settings for what each field does and how changing it takes effect.

Defaults

A newly created index starts with:

{
	"indexTime": {
		"searchableTiers": [
			{ "attributes": ["title", "hierarchy.lvl0", "hierarchy.lvl1"], "typoTolerance": true },
			{ "attributes": ["hierarchy.lvl2", "hierarchy.lvl3", "hierarchy.lvl4", "hierarchy.lvl5", "hierarchy.lvl6"], "typoTolerance": true },
			{ "attributes": ["content", "description"], "typoTolerance": true },
			{ "attributes": ["url"], "typoTolerance": false }
		],
		"attributesForFaceting": ["type", "lang"],
		"languages": ["en"],
		"dictionary": [],
		"partitionKey": null
	},
	"queryTime": {
		"customRanking": [],
		"synonyms": [],
		"pins": [],
		"hides": [],
		"typoTolerance": true,
		"ignorePlurals": true,
		"removeWordsIfNoResults": "lastWords",
		"distinctAttribute": "url",
		"queryLogging": true
	}
}

Partial updates

PUT merges the fields you send into the existing settings — send only what changed:

curl -X PUT https://api.usesuo.com/1/indexes/docs/settings \
  -H "x-suo-key: suo_admin_YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{ "queryTime": { "pins": [{ "id": "p1", "query": "pricing", "objectID": "page-pricing", "position": 0 }] } }'

Index-time changes take effect asynchronously

A PUT that changes indexTime fields is accepted immediately, but re-tokenizing existing records happens in the background; the index keeps serving on its current tokenization until the rebuild finishes and swaps in. A queryTime-only change applies to the very next query.

On this page