# Full-Text and Semantic Search | Search AI Conversations | DialogueDB

> Full-text and semantic search built into your conversation database. Match by meaning and exact term, filter by tenant, tags, and dates, all in one call.

Canonical: https://dialoguedb.com/architecture/search
Updated: 2026-07-08

Search & Retrieval

# Find the right message by
meaning and by exact term

One query searches every message by meaning, with exact-term matching layered on. Narrow by namespace, tags, dates, and metadata in the same call. No separate search service to run.

[Get Your API Key](https://app.dialoguedb.com/signup) [See the Docs](https://docs.dialoguedb.com/api/search)

problems exporting data

Filters namespace: tenant\_acme tag: feedback created: last 30 days

18 results  Ranked by relevance

Exact term Feedback · 3 days ago 0.94

The CSV export keeps timing out on large projects.

Meaning Trial feedback · last week 0.88

How do I pull my report into a spreadsheet?

Meaning Support chat · yesterday 0.82

Is there a way to download everything as one file?

Where search usually falls short

## One kind of matching is
never enough for conversations

Conversations mix loose phrasing with exact terms like error codes and product names. Pick one search method and you miss half of what you were looking for.

### Keyword search misses the meaning

A search for "logout" never finds the user who wrote "my session expired." When people describe the same problem in different words, exact matching leaves the right message buried. DialogueDB matches by meaning first, so wording does not have to line up.

### Meaning-only search misses exact terms

Semantic search alone can drift past an error code, an order ID, or a product name that has to match exactly. DialogueDB layers exact-term matching on top of meaning, so a literal string still lands when it matters.

### Filtering means a second system

Narrowing by tenant, date, or a status field usually means bolting a separate filter layer onto your search, or pulling everything back and filtering in your app. DialogueDB takes namespace, tags, dates, and metadata in the same search call.

Inside a single query

## Meaning and exact terms, in a single query

You describe what you are looking for in plain language. DialogueDB matches by meaning, adds exact-term matching alongside it, applies your filters, and returns results ranked by relevance. All from one call.

### Semantic first, so wording does not have to match

Your query is compared by meaning against every message, dialogue, and memory. The right result surfaces even when it shares none of the same words.

### Exact-term matching layered on top

The same query also matches literal terms, then merges those results with the meaning matches. Error codes, IDs, and product names land exactly, with no separate search to run.

### Filters narrow the same call

Namespace, tags, metadata, and date ranges narrow the results without giving up meaning-based ranking. There is no second query and no post-filtering in your app.

### One query, two kinds of matching, merged

Your query

exporting data

By meaning

finds "download as a file"

By exact term

finds "CSV export"

Merged and ranked

by relevance

0.94

0.88

0.82

Filters narrow the merged results in the same call.

The whole search

## Query, filters, ranked results, in one call

No query language to learn, no index to configure, no search service to run.

search.ts

const { results } \= await db.searchMessages (

"problems exporting data" ,

{

tags : \[ "feedback" \] ,

filter : { created : "last 30 days" }

}

)

for ( const { item, relevance } of results) {

console.log (item.content, relevance)

}

1 You search in plain English The query is an ordinary sentence. No query language or SQL to write. 2 Filters focus the results Narrow the same search by topic and time window. Scope it to one customer with a namespace too. 3 Ranked results come back Every match returns with a relevance score, strongest first, so the top hits are ready to use.

One call does all three, whichever object you search.

### Search that stays in sync with your data

Meaning, exact terms, and filters in a single call, with no separate search system to keep aligned as your conversations change.

[Start Free](https://app.dialoguedb.com/signup) [Compare Plans](https://dialoguedb.com/pricing)

Filters built in

## Narrow by structure,
keep the ranking by meaning

Every filter rides on the same search call. Combine them freely to
scope results to the slice you care about.

meaning match 1,240

\+ namespace 210

\+ tag: feedback 64

\+ last 30 days 18

Each filter compounds, narrowing the same query without a second call.

### Namespace

Scope a search to one user, tenant, workspace, or account. Retrieval stays inside that partition, so one customer never sees another's messages.

### Tags

Filter by broad categories like support, billing, or feedback. Operators match any tag, require every tag, or exclude tags outright.

### Metadata

Filter on structured fields you control, like tier, region, status, or priority. Match values, match a list, or compare numbers with greater-than and less-than operators.

### Dates

Filter by created or modified time. Use natural phrases like "last 30 days" or "March 2025", or exact ISO boundaries, with a timezone for where the day starts.

Search across all of it

## Messages, dialogues, or memories, from one API

Pick the object that fits the job. The same query, filters, and ranking apply to each.

### Messages

`db.searchMessages()`

Find the exact turn where a user reported an issue, asked a question, or gave you the wording you need to quote.

### Dialogues

`db.searchDialogues()`

Whole conversations ranked by relevance, with supporting message evidence, so you can find where a topic came up without reading every thread.

### Memories

`db.searchMemories()`

Durable facts and user context stored across sessions, like preferences, constraints, and prior decisions.

agent-tool.ts

TypeScript

```
// Search works well as a tool for an LLM agent:
// the model writes the query, you enforce the scope
const { results } = await db.searchMemories(
  "notification preferences and timezone",
  {
    namespace: "user_456",
    tags: { $nin: ["expired"] },
    limit: 5
  }
)

// Feed the retrieved context back to your model
const context = results.map((r) => r.item.content)
```

How the approaches compare

## One call versus a search stack you assemble

Each of these can be made to work. The difference is how many moving parts you own to get meaning, exact terms, and filters in the same result.

| Approach                        | Matches meaning | Matches exact terms | Filters                          | Setup                    |
| ------------------------------- | --------------- | ------------------- | -------------------------------- | ------------------------ |
| Keyword search in your database | No              | Yes                 | Your queries                     | Already there            |
| Vector database on its own      | Yes             | Weak on exact terms | Metadata you model               | Account, index, pipeline |
| Bolt-on search service          | Sometimes       | Yes                 | Its own filter layer             | Separate system to sync  |
| DialogueDB                      | Yes             | Yes, layered on     | Namespace, tags, metadata, dates | None, one call           |

## Frequently asked questions

Do I have to choose between keyword search and semantic search?

You do not choose between keyword and semantic search. Every query matches by meaning first, and exact-term matching runs alongside it, so one search finds both the message that means the same thing and the one that contains the literal term.

Which filters can I apply to a search?

You can filter a search by namespace, tags, metadata, and date range. Namespace scopes results to one user, tenant, or workspace. Tags support match-any, match-all, and exclude operators. Metadata supports equality, list, and numeric comparisons. Dates accept natural phrases like "last 30 days" or exact ISO ranges. Every filter narrows the results without giving up ranking by meaning.

Can I filter search by message role, like user versus assistant?

Search filters do not include message role. They cover namespace, tags, metadata, and dates. Role is returned on every message result, so you can filter by role in your own code after retrieval, or tag messages by role when you write them to make role filterable.

What can I search across?

You can search across messages, dialogues, and memories, each with its own method. Search messages for exact wording and evidence, dialogues for whole conversations about a topic, and memories for durable facts and user context that outlive a single session.

How are search results ranked?

Search results are ranked by relevance by default, strongest match first, and each result carries a relevance value that orders it within that response. You can instead order by created or modified date, in which case the relevant results are found first and then reordered by time.

Is search included in my plan or metered separately?

Search is included in every plan and is not metered separately. Semantic search is available on every plan from the free tier with no per-query charge, and exact-term matching is available on Starter and above. All plans share the same API rate limits.

## Search built into the database
your conversations already live in

No search service to run. No query language to learn. Start free and search your conversations in minutes.

[Get Started Free](https://app.dialoguedb.com/signup) [Read the Docs](https://docs.dialoguedb.com/api/search)
