Integrating Twiggle’s API into your indexing process adds semantic understanding of your catalog data to your Solr index. This is required in order for catalog listings that match your users’ search queries to be available for retrieval via the Twiggle API.
Twiggle’s semantic models are continually enhanced to comply with emerging search patterns. To ensure consistency between the semantic models used to understand your catalog data and your users’ search queries, it is essential that you process your entire catalog through the
/listings endpoint at least once a week. You may also use the /
listings endpoint for ongoing catalog updates and additions.
To integrate the Twiggle API in your indexing process, your indexing logic should include the following steps:
- Extract listing features
Send your catalog data as batches of
Listingobjects — the Twiggle API’s input objects for raw listing data — through
POST /listingscalls. The API’s responses will include batches of
Featuresobjects — one object per each listing in the request. These objects are structured representations of product features extracted by the Twiggle API from the listing data in the request.
- Index listing features in Solr
Featuresobjects into search documents and index them in Solr. This will require a one-time update to your search engine schema configuration.
Please Note: Integrating the Twiggle API as part of your indexing process will increase the overall index size. Capacity planning and resource allocation should be considered to avoid performance degradation.