# Build Google-Quality Search in Minutes

> Combine vector similarity, full-text search, and custom ranking with automatic query understanding and typo correction. Index millions of documents, search across multiple fields, and return results in <50ms P95 with intelligent caching, fuzzy matching, and semantic understanding at 300+ edge locations.

Canonical: https://searches.do/

## In code

```ts
import { Searches } from 'searches.do'

// Hybrid search: vector + full-text
const search = Searches({ index: 'products', fields: ['name', 'description'] })

on.User.search.Products(async $ => {
  const results = await search.query($.query, {
    filters: { category: 'electronics', price: { $lt: 1000 } },
    facets: ['brand', 'category'],
    typoTolerance: 2
  })
  $.User.send.Results(results)
})
```

## Frequently asked questions

### What types of search does searches.do support?

Full-text keyword search, vector semantic search, hybrid ranking combining both, and custom scoring functions. Built-in support for exact match, prefix matching, fuzzy search, phrase queries, and boolean operators (AND/OR/NOT). Automatic language detection and multi-language support for 30+ languages.

### How does semantic vector search work?

Documents automatically embed using OpenAI, Cohere, or custom models. Vector similarity finds conceptually related results even with different keywords. Hybrid mode combines vector relevance with keyword matching for best results. Supports cosine similarity, dot product, and L2 distance metrics.

### Can I customize ranking and relevance?

Yes. Boost specific fields, apply custom scoring functions, use metadata for ranking (recency, popularity, price), and A/B test ranking algorithms. Machine learning re-ranking with user click data to improve relevance over time. Full control over result ordering with TypeScript functions.

### How do filters and facets work?

Filter by any field with range queries, exact matches, or custom conditions. Faceting provides aggregated counts for filter options (e.g., brands, categories, price ranges). Real-time facet updates as filters change. Nested facets and hierarchical filtering supported for complex catalogs.

### What about performance at scale?

Sub-50ms query latency for indexes up to 10M documents with intelligent sharding and caching. Automatic index optimization, incremental updates, and background reindexing. Scales horizontally across edge locations with eventual consistency. Enterprise plans support 100M+ documents with dedicated resources.

## Part of Platform.do

searches.do is one of the primitives of Platform.do, in the Data layer (records, vocabulary and search). Every .do shares one grammar, Business-as-Code, and one SDK.

- What is Business-as-Code? https://platform.do/business-as-code
- Platform.do: https://platform.do/
- Docs: https://docs.platform.do
