Path Parameters
Collection ID.
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())Adds a new field type to a given collection.
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())Collection ID.
Was this page helpful?