Get Started in Five Minutes
This quickstart guide explains how you can create a search collection for your website, app or e-commerce store in a five minutes.
Select your use case:
After creating your Sajari account, you will be asked to select a use case. Choose:
- "Website” if you want to add search to your website and let Sajari take care of the indexing just like Google does.
- “E-commerce & apps” if you want to add search to your e-commerce store or app.
Create a Collection
A collection is a store of all your data and associated configuration. It can contain webpages, documents, or records that you want to make searchable. Enter a name for your collection based on your use case, e.g. ‘my-domain--com’ or ‘my-store’.
Index your website by simply entering your website URL after selecting 'Website' from the welcome screen.
Sajari's crawler then visits your website pages, processes the html document of each page and stores records in your collection. The initial indexing process takes about 30 seconds to complete. Indexing will continue in the background if all pages have not been indexed as part of the initial setup. The time to index all your webpages depends on the size of your site.
When indexed, search the data stored in your collection from the Preview section.
E-commerce & Apps
Create an e-commerce or app store search collection by:
- Adding data to your collection
- Validating your schema
- Selecting and prioritising searchable fields
- Training query suggestions
Start by providing single or multiple records that will be used to infer a schema for your collection. You can either paste JSON or upload a file in JSON format. Learn more on acceptable JSON formats. If you do not have a dataset or just want to play around you can start with the demo dataset and the following three steps will be skipped.
Validate your schema
Sajari infers a schema for your collection based on the data you provided. Make sure all fields are present and have been listed with the correct types. A few things to look out for:
- Select at least one ‘unique’ field. Usually this will be an ‘id’, ‘sku’ or similar field in your data.
- Required fields must be populated on each record. If a required field is missing the record will not be added to your collection.
- List fields are useful when you have a nested record with multiple values for a field (e.g. color field having ‘red’, ‘blue’, and ‘green’ values).
When you are finished validating your schema, click on “Create Schema” to confirm and create your schema.
Select and prioritise searchable fields
Select your searchable fields to define which fields will be used to assess text relevance and drag them into order of importance.
For example, when a user searches for a term (e.g. “headphones”), only the records with the term “headphones” in a searchable field will be returned.
For an e-commerce store, searchable fields may include fields like product name, product description, or a category name. Fields like dimensions or stock count could be examples of non-searchable fields.
Train query suggestions
Select the fields to be used to train autocomplete query suggestions. We recommend choosing shorter fields with less than 5 terms. Fields like product name, category, brand are usually good choices. Click on “Select fields” to confirm your selection.
Once completed, the records you added in step 1 will be added to your collection. You can continue importing more records using the API.
🎉 Congratulations! You have successfully finished setting up your search collection.