How Gainly Search Works
This guide explains the core concepts behind how Gainly AI Search works.
Core Concepts¶
Documents¶
A document is the fundamental data unit in Gainly. Each document consists of:
- Text fields:
title
: The document's titlecontent
: The main text content
- Metadata: Structured key-value pairs that provide additional context (document attributes)
For example, a document for a red cotton t-shirt might look like:
{
"title": "Red Cotton T-Shirt",
"content": "Comfortable cotton t-shirt perfect for everyday wear...",
"metadata": {
"color": "red",
"price": 29.99,
"in_stock": true,
"release_date": "2024-01-01T00:00:00.000Z",
"tags": ["clothing", "casual"],
"store_location_geo_point": {
"lat": 45.67,
"lon": -111.04
}
}
}
Semantic Index¶
Before documents can be searched, they must be added to your Gainly semantic index.
Gainly extracts and stores the semantic meaning (the underlying context and relationships) of your documents in the index.
Gainly maintains separate semantic indexes for Test and Live modes, allowing you to experiment freely without affecting production data.
Search Types¶
Gainly offers several search types to choose from, to suit your use case.
Other AI Features¶
The Gainly API offers a rich set of AI features beyond search, all leveraging our semantic index. Discover all the features in our API Reference.
Getting Started¶
- Sign up for a free Gainly account
- Follow our Quickstart Guide to perform your first AI semantic search
- Add documents to your semantic index using the Add Document API
- Use the Search Documents API to query your documents
- Experiment with different search types and metadata configurations in Test mode
- Move to Live mode when ready for production
For detailed API references and code examples, check out our API Documentation.