Guide
...
Data Indexing
Synchronising Data
7 min
creating or updating records batches of records can be sent to the indexing endpoint ( indexing ksearchnet com/v2/batch ) in order to add or update search data using the indexing\batchservice data is sent as a collection of record objects (within a recorditerator), which are transmitted as a single request note that if too many records are included in the same batch, the request will be rejected (either by the php sdk validation or the api itself) the implementing application is responsible for creating and processing batches data contained within a record includes true false 179false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type ids must be unique within your entire index, not just within a specific record type for example, you could not send records with id "1" for both "klevu product" and "klevu category" if you are synchronising multiple record types which share ids in your application, we recomend using a prefix for most or all records to ensure their uniqueness for example product 1 / category 1 note, data validity is not checked within the model itself, but is performed by the recordvalidator this validator is not executed until you interact with klevu apis via the indexing\batchservice, meaning invalid ids or attribute names, for example, will not be picked up at time of definition validation and exception handling prior to transmitting data, the provided account credentials are validated as not empty and correctly formatted, throwing a validationexception on failure prior to transmitting data, the record data is validated, throwing a validationexception on failure request exceptions, or responses identifying an invalid request throw a badrequestexception client or network exceptions, responses with unexpected status codes, or responses with a missing or invalid body content throw a badresponseexception logging request headers and body are logged prior to send at debug level data used to generate the request bearer token is logged at debug level response headers, body, and execution time are logged on successful request send at debug leveldeleting records more information and code samples can be found under send records for indexing deleting records batches of record ids can be sent to the indexing endpoint ( indexing ksearchnet com/v2/batch/delete ) in order to remove search data using the indexing\batch\deleteservice data is provided as an array of strings corresponding to the id value used when creating the record (above); type is not required as id is unique across all records validation and exception handling prior to transmitting data, the provided account credentials are validated as not empty and correctly formatted, throwing a validationexception on failure prior to transmitting data, the record ids are validated, throwing a validationexception on failure request exceptions, or responses identifying an invalid request throw a badrequestexception client or network exceptions, responses with unexpected status codes, or responses with a missing or invalid body content throw a badresponseexception logging request headers and body are logged prior to send at debug level data used to generate the request bearer token is logged at debug level response headers, body, and execution time are logged on successful request send at debug leveldeleting records more information and code samples can be found under delete records from index