Skip to main content
POST
/
collections
/
{collection}
/
schema
/
fieldTypes
Create a field type
import requests

url = "https://{FUSION HOST}/api/collections/{collection}/schema/fieldTypes"

payload = {
    "name": "<string>",
    "analyzer": {
        "tokenizer": { "class": "<string>" },
        "filters": [{ "class": "<string>" }],
        "type": "<string>",
        "class": "<string>"
    },
    "indexAnalyzer": {
        "tokenizer": { "class": "<string>" },
        "filters": [{ "class": "<string>" }],
        "type": "<string>",
        "class": "<string>"
    },
    "queryAnalyzer": {
        "tokenizer": { "class": "<string>" },
        "filters": [{ "class": "<string>" }],
        "type": "<string>",
        "class": "<string>"
    },
    "indexed": True,
    "stored": True,
    "multiValued": True,
    "positionIncrementGap": 123,
    "class": "<string>"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())

Path Parameters

collection
string
required

Collection ID.

Body

application/json

Field type configuration.

name
string
analyzer
object
indexAnalyzer
object
queryAnalyzer
object
indexed
boolean
stored
boolean
multiValued
boolean
positionIncrementGap
integer
class
string