Create a collection field
import requests
url = "https://{FUSION HOST}/api/collections/{collection}/schema/fields"
payload = {
"name": "<string>",
"type": "<string>",
"indexed": True,
"stored": True,
"multiValued": True,
"required": True,
"docValues": True,
"omitNorms": True,
"omitPositions": True,
"omitTermFreqAndPositions": True,
"termVectors": True,
"termPositions": True,
"termOffsets": True,
"copyDests": ["<string>"],
"copySources": ["<string>"],
"numDocs": 123,
"default": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)This response has no body data.Create a collection field
Adds a field to a given collection.
POST
/
collections
/
{collection}
/
schema
/
fields
Create a collection field
import requests
url = "https://{FUSION HOST}/api/collections/{collection}/schema/fields"
payload = {
"name": "<string>",
"type": "<string>",
"indexed": True,
"stored": True,
"multiValued": True,
"required": True,
"docValues": True,
"omitNorms": True,
"omitPositions": True,
"omitTermFreqAndPositions": True,
"termVectors": True,
"termPositions": True,
"termOffsets": True,
"copyDests": ["<string>"],
"copySources": ["<string>"],
"numDocs": 123,
"default": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)This response has no body data.Path Parameters
Collection ID.
Body
application/json
Field configuration.
Response
200 - undefined
Was this page helpful?
⌘I