Create Fields in HawkSearch
The index data that is stored in HawkSearch can be thought of as a list of fields. Common field examples include “title,” “description,” “price,” etc. You can create these fields manually through the HawkSearch UX or through the API. To get you started quickly, we have created a postman collection that will help you get the fields created.
As mentioned in the Getting Started section, we're suggesting you use Postman to get the initial sandbox up and running. There is a request in the collection called “Bulk Field Creation.” It will use a CSV file with a number of fields in it.
Step 1: Save the Fields CSV
We have created a CSV with a basic set of fields which you can download here:
The file has 12 fields in it with basic attribute settings. Looking at the column headings will give you an idea of the types of attributes you can assign to a field. Note that there are many more attributes available.
The following fields are in this file:
Name | Description |
---|---|
key | Unique identifier |
title | Name of the Product |
sku | Sku for the product |
description | (Short) description of the product |
image | URL to the image of the product |
brand | Brand of the product |
color | Color of the product (this can contain a single value or multiple) |
price | Price of the product |
url | URL to the detail page of the product |
type | This is an internal field for HawkSearch. “Items” and “Content” can be presented slightly differently. This quickstart example is only including items (ie products) |
category | Category of the product (this can contain a single value or multiple) |
Step 2: Point Bulk Field Creation Endpoint to Your HawkSearch Account
After you import the collection into your Postman instance, go to the Bulk Field Creation request and click on the “Headers” tab – there you can add the API key in the “Value” field that you got above in the Getting Started section:

Remember to hit ”Save” on the top so that the API key is saved when you run the collection in the next step.
Step 3: Run the Postman Collection
There is a request in the Postman file called “Bulk Field Creation” – you can run the collection from Postman:

… and then only select that Bulk Field Creation option:

Then click on the “Select File” option on the right under the Data title and upload the HawkSearch_Sandbox_Quickstart_Bulk_Field_Creation.csv file that you downloaded above.
Note you can click on the “preview” option to the right of the file you just uploaded – it will show you the fields that were parsed and are ready to be run.
Click on Run.
Step 4: Confirm the collection ran successfully
Make sure there were no errors when each line was run. You’ll notice you can click on each run and see the call that was sent – sometimes that will indicate what the error is if there is an issue.
Then log into your HawkSearch instance on https://dev.hawksearch.net and navigate to Workbench -> Data Configuration -> Fields and you should see your list of fields there.

Note: Remember this process! We are going to repeat it two more times for facets and then the product data.
Updated 9 months ago