What is Search as a Service?
Search is a core part of any business database function — whether through internal databases, internal document stores, or the content of a website — and it's needed for both internal staff and external customers. A search-as-a-service provider does the heavy lifting of implementing that search for you: it's hosted in the cloud, and operated and managed entirely by the provider, so you get scalability and performance without owning the infrastructure or the risk behind it.
Why building your own search is risky
Implementing search for millions of documents, with thousands of concurrent users and strict low-latency requirements, is challenging. It requires expert knowledge and often specialized software that isn't readily available — and even open-source alternatives tend to come with expensive hardware requirements.
Building search in-house doesn't just require specialized expertise and a dedicated engineering team — it's also a time-consuming project with real project risk attached. According to one study, 68 percent of IT projects fail.
What a search-as-a-service provider does for you
Using search as a service frees you from the risks that come with large IT projects, because it's hosted in the cloud and operated by the provider. It offers a risk-free, turn-key solution with high performance and a very short time-to-market — removing the need to set up an IT project and a dedicated team just for development and operation.
A provider can also draw on the scaling effects of a multi-tenant architecture to offer the service at a much lower cost than hosting your own on-premises search. That makes it particularly useful for mobile applications too, where the client device is limited in storage, processing speed, and connection bandwidth.
The software-as-a-service model behind it
Search-as-a-service is based on the software-as-a-service (SaaS) model, in which software is licensed on a subscription basis and centrally hosted. SaaS applications are also known as web-based software, on-demand software, or hosted software, and the term is generally considered part of cloud computing, alongside infrastructure as a service (IaaS).
SaaS extends the idea of the older ASP model. Where most ASPs focus on managing and hosting third-party, independent software vendors' software, SaaS vendors typically develop and manage their own software — and normally serve multiple businesses and users from a single multi-tenant architecture.
How it works
The client uses the search-as-a-service provider's search API to upload the content to be searched. The provider then constructs a search index for that content. From there, the client uses the same API to query their indexed data — no servers, index maintenance, or query-tuning infrastructure to run themselves.
The client sends documents or records to the provider through the search API.
The provider constructs and maintains the search index in the cloud, hosted and operated for you.
The client calls the same API to search their indexed data at low latency, at any scale.
Also known as
Search as a service is offered under various names, sometimes covering slightly different aspects of search: hosted search, managed search, search provider, cloud search, site search, enterprise search, custom search, or eCommerce search.
API quickstart
In practice, the upload-index-query flow above maps onto a small number of REST calls (also available via the generated Rust seekstorm_client SDK, or embeddable directly via the seekstorm Rust library if you'd rather run it yourself).
1. Create an index
Define the schema of the content you want searchable — which fields exist, their types, and how they should be indexed.
{
"index_name": "demo_index",
"schema": [
{"field": "title", "field_type": "Text", "store": true, "index_lexical": true, "boost": 10.0},
{"field": "body", "field_type": "Text", "store": true, "index_lexical": true},
{"field": "url", "field_type": "Text", "store": true, "index_lexical": false}
],
"similarity": "Bm25fProximity",
"tokenizer": "UnicodeAlphanumeric",
"synonyms": []
}
use seekstorm::index::{CreateIndexRequest, LexicalSimilarity, TokenizerType, StemmerType, StopwordType, FrequentwordType, NgramSet, DocumentCompression, Clustering}; use seekstorm::vector::Inference; use seekstorm_client_rs::api_endpoints::RestClient; let schema_json = r#"[ {"field":"title","field_type":"Text","store":true,"index_lexical":true,"boost":10.0}, {"field":"body","field_type":"Text","store":true,"index_lexical":true}, {"field":"url","field_type":"Text","store":true,"index_lexical":false} ]"#; let schema = serde_json::from_str(schema_json).unwrap(); let create_index_request = CreateIndexRequest { index_name: "demo_index".into(), similarity: LexicalSimilarity::Bm25f, tokenizer: TokenizerType::UnicodeAlphanumeric, stemmer: StemmerType::None, stop_words: StopwordType::None, frequent_words: FrequentwordType::English, synonyms: Vec::new(), ngram_indexing: NgramSet::NgramFF as u8, document_compression: DocumentCompression::Snappy, spelling_correction: None, query_completion: None, clustering: Clustering::None, inference: Inference::None, schema, }; let client = RestClient::new(); let index_id = client .create_index(BASE_URL, API_KEY, &create_index_request) .await?;
2. Upload content
Send documents to the provider's API — this is the "upload" step in the search-as-a-service flow. The provider builds and maintains the index for you.
[
{"title": "title1 test", "body": "body1 test", "url": "url1"},
{"title": "title2", "body": "body2 test", "url": "url2"}
]
use seekstorm::index::Document; let documents_json = r#"[ {"title":"title1 test","body":"body1 test","url":"url1"}, {"title":"title2","body":"body2 test","url":"url2"} ]"#; let documents: Vec<Document> = serde_json::from_str(documents_json).unwrap(); client.index_documents(BASE_URL, API_KEY, index_id, &documents).await?;
3. Query the index
Once content is indexed, the client queries it through the same API — the "search" half of search as a service.
{
"query": "test",
"offset": 0,
"length": 10,
"realtime": false
}
use seekstorm::index::SearchRequestObject; use seekstorm::search::{QueryRewriting, QueryType, ResultType, SearchMode}; let request = SearchRequestObject { query_string: "test".into(), query_vector: None, enable_empty_query: false, offset: 0, length: 10, result_type: ResultType::TopkCount, query_type_default: QueryType::Intersection, search_mode: SearchMode::Lexical, realtime: false, query_rewriting: QueryRewriting::SearchOnly, highlights: Vec::new(), fields: Vec::new(), field_filter: Vec::new(), distance_fields: Vec::new(), query_facets: Vec::new(), facet_filter: Vec::new(), result_sort: Vec::new(), }; let result = client.query_index(BASE_URL, API_KEY, index_id, request).await?; println!("{}", serde_json::to_string_pretty(&result).unwrap());