This API allows you to create/update fields in Hawksearch dashboard and manage the field configurations.
Example use case: Create a Brand field that can be used as a facet filter and to query index.
Request: POST request to the API below:
Code Block | ||
---|---|---|
| ||
POST /api/v9/field HTTP/1.1
Host: manage.hawksearch.com
X-HawkSearch-ApiKey: USE_YOUR_API_KEY
Cache-Control: no-cache
Postman-Token: cd457184-4c00-a650-62f2-530f22a9a384
{
"FieldId": 0,
"SyncGuid": "00000000-0000-0000-0000-000000000000",
"Name": "brand",
"FieldType": "facet",
"Label": "Brand",
"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. Description of the data is as follows:
...