/
Using API to Update Fields
Using API to Update Fields
This API allows you to update a field in Hawksearch dashboard and manage the field configurations.
Example use case: Update label of a Brand field.
Request: PUT request to the API below:
PUT /api/v9/field/479976 HTTP/1.1
Host: dashboard-na.hawksearch.com
X-HawkSearch-ApiKey: USE_YOUR_API_KEY
Cache-Control: no-cache
Postman-Token: cd457184-4c00-a650-62f2-530f22a9a384
{
"FieldId": 479976,
"SyncGuid": "5cf5ea85-ab8a-45a1-86bd-7e87165e4fbb",
"Name": "brand",
"FieldType": "facet",
"Label": "Brand New Label",
"Type": "String",
"Boost": 1,
"FacetHandler": 0,
"IsPrimaryKey": false,
"IsOutput": true,
"IsShingle": false,
"IsBestFragment": false,
"IsDictionary": false,
"IsSort": false,
"IsPrefix": false,
"IsHidden": false,
"IsCompare": false,
"SortOrder": 0,
"PartialQuery": "",
"IsKeywordText": true,
"IsQuery": false,
"IsQueryText": false,
"SkipCustom": false,
"StripHtml": false,
"MinNGramAnalyzer": 2,
"MaxNGramAnalyzer": 15,
"CoordinateType": 0,
"OmitNorms": false,
"ItemMapping": "",
"DefaultValue": "",
"UseForPrediction": false,
"CopyTo": "",
"Analyzer": "",
"DoNotStore": false,
"Tags": "",
"Iterations": [
1
],
"AnalyzerLanguage": "",
"PreviewMapping": null,
"OmitTfAndPos": false,
"CreateDate": "02-04-2021",
"ModifyDate": "02-04-2021"
}
Response: The response is an array of field objects, every field object being a series of key-value pairs. For the description of the data, please refer to https://hawksearch.atlassian.net/wiki/spaces/HSKB/pages/1469743105/Using+API+to+Create+Fields#Overview
{
"FieldId": 479976,
"SyncGuid": "5cf5ea85-ab8a-45a1-86bd-7e87165e4fbb",
"Name": "Brand",
"FieldType": "facet",
"Label": "Brand New Label",
"Type": "String",
"Boost": 1,
"FacetHandler": 0,
"IsPrimaryKey": false,
"IsOutput": true,
"IsShingle": false,
"IsBestFragment": false,
"IsDictionary": false,
"IsSort": false,
"IsPrefix": false,
"IsHidden": false,
"IsCompare": false,
"SortOrder": 10,
"PartialQuery": "",
"IsKeywordText": false,
"IsQuery": false,
"IsQueryText": false,
"SkipCustom": false,
"StripHtml": false,
"MinNGramAnalyzer": 2,
"MaxNGramAnalyzer": 15,
"CoordinateType": 0,
"OmitNorms": false,
"ItemMapping": "",
"DefaultValue": "",
"UseForPrediction": false,
"CopyTo": "",
"Analyzer": "",
"DoNotStore": false,
"Tags": "",
"Iterations": [
1
],
"AnalyzerLanguage": null,
"PreviewMapping": null,
"OmitTfAndPos": false,
"CreateDate": "03-08-2021",
"ModifyDate": "03-08-2021"
}
, multiple selections available,
Related content
Bulk Field Creation
Bulk Field Creation
More like this
Using API to Create Fields
Using API to Create Fields
More like this
Using API to Update Facets
Using API to Update Facets
More like this
Using API to Delete a Field
Using API to Delete a Field
More like this
Using API to Get Field Information
Using API to Get Field Information
More like this
Manage Definition
Manage Definition
More like this