Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Section


Column
width70%


Info
titleImportant

Depending on the version of HawkSearch used, method of integration, and the presence of data feed files for indexing, you may need to perform indexing as per this article or Using Dashboard API to Rebuild Indexes. Please contact HawkSearch for any clarifications.

Domains

Hawksearch has three environments available: Development, Test and a load-balanced Production.  When using the search API methods in this document, the following domains can be used to access each environment after your engine has been set-up in that environment.

Note: to index hierarchical data, please build the hierarchy using the Hierarchy API and then call the index-items API.

Development

indexing-dev.hawksearch.net/

Configurations for an engine in this location are maintained in the Hawksearch Workbench at dev.hawksearch.net.

Test

indexing-test.hawksearch.net/

Configurations for an engine in this location are maintained in the Hawksearch Workbench at test.hawksearch.net.

Production

indexing.hawksearch.com/

Configurations for an engine in this location are maintained in the Hawksearch Workbench at manage.hawksearch.com



Column
width30%

Contents

Table of Contents
maxLevel2


...

Expand
titleExamples

Example 2.1

Delete single item from index

{
    "IndexName": "myengine.20200123.153931",

         "Id": "Item_DocId"
}


Response

Expand
titleStructure

None or Message with Error

Object

Data Type

Description

IndexNames

Array of strings

Each string contains the names of the indexes that exist in the engine.  The most recently created will be listed first.

IndexName

StringContains the name of the index that is currently active.
MessageStringWill return error message in case if occurs


...

Expand
titleExamples

Example 3.1

Delete single item from index

{
    "IndexName": "myengine.20200123.153931",

         "Ids": ["Item_DocId", "Item_Doc2Id"]
}


Response

Expand
titleStructure

None or Message with Error

Object

Data Type

Description

None or Message with Error




...

Expand
titleStructure


Object

Data Type

Always

Description

Status

 String

Yes


SummaryArray of objectsYes
> TotalNumericYes
> SucceededNumericYes
> FailedNumericYes
> WarningsNumericYes
ItemsArray of objectsNo
> Item


> StatusString

> IgnoredFieldsArray

List of fields that were ignored during indexing due to incompatibility with fields configuration


Update Items

This method updates items and their attributes to a specified index. Attributes must be defined in the Hawksearch Workbench Fields list in order for the attributes to be stored for an object. Once an item is updated with this method, it will immediately be available in search results, if the modified index is queried.

...

Endpoint

Method

Header Key

api/v2/indexing/rebuild-learning

POST

X-HawkSearch-ApiKey


Expand
titleParameters


NameData TypeRequiredDescriptionSource or Admin Section

IndexName

String

Yes




...

Endpoint

Method

Header Key

api/v2/indexing/rebuild-related

POST

X-HawkSearch-ApiKey


Expand
titleParameters


NameData TypeRequiredDescriptionSource or Admin Section

IndexName

String

Yes




...

Anchor
IndexeingSteps
IndexeingSteps

Hawksearch v4.0 - Indexing API - What are the basic steps to getting an index up?

Create Fields

  1. Establish what fields/attributes need to be in Hawksearch. Consider what needs to be searched, what needs to be displayed on the search results page and what might be needed to use for merchandising. Some examples of fields that could be needed for merchandising: a rating field to sort by top rated; a sales margin to use for featured products.
  2. Create fields in Hawksearch workbench for each field/attribute that will be sent to Hawksearch. Alternatively, these fields can be created using the REST API.

...