Create synonym entries
import requests
url = "https://{FUSION HOST}/api/collections/{collection}/synonyms/{path}/items"
payload = {
"id": "<string>",
"mapping": "<string>",
"category": "<string>",
"enabled": True,
"modified": "2023-11-07T05:31:56Z",
"user": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"mapping": "<string>",
"category": "<string>",
"enabled": true,
"modified": "2023-11-07T05:31:56Z",
"user": "<string>"
}Create synonym entries
Add one or more new entries to a synonyms file.
POST
/
collections
/
{collection}
/
synonyms
/
{path}
/
items
Create synonym entries
import requests
url = "https://{FUSION HOST}/api/collections/{collection}/synonyms/{path}/items"
payload = {
"id": "<string>",
"mapping": "<string>",
"category": "<string>",
"enabled": True,
"modified": "2023-11-07T05:31:56Z",
"user": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"mapping": "<string>",
"category": "<string>",
"enabled": true,
"modified": "2023-11-07T05:31:56Z",
"user": "<string>"
}Headers
The Fusion user for authentication.
Path Parameters
The name of a collection.
The path to a synonyms file.
Pattern:
.*Query Parameters
If true, commit the change to Solr immediately instead of asynchronously.
Body
application/json
JSON-formatted synonym entries.
Was this page helpful?
⌘I