Skip to content

DX-1894: search docs init #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added img/search/add-data.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/search/add-document.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/search/create-database.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/search/database-created.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/search/first-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/search/select-plan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
"name": "Workflow",
"url": "workflow"
},
{
"name": "Search",
"url": "search"
},
{
"name": "Developer API",
"url": "devops"
Expand Down Expand Up @@ -1377,6 +1381,81 @@
"workflow/roadmap",
"workflow/llms-txt"
]
},
{
"group": "",
"pages": [
{
"group": "Overall",
"pages": [
"search/overall/getstarted",
"search/overall/whatisupstashsearch",
"search/overall/pricing"
]
},
{
"group": "Features",
"pages": [
"search/features/algorithm",
"search/features/indexes",
"search/features/content-and-metadata",
"search/features/filtering",
"search/features/reranking"
]
},
{
"group": "SDKs",
"pages": [
{
"group": "Typescript",
"pages": [
"search/sdks/ts/getting-started",
"search/sdks/ts/contributing",
{
"group": "Commands",
"pages": [
"search/sdks/ts/commands/search",
"search/sdks/ts/commands/upsert",
"search/sdks/ts/commands/fetch",
"search/sdks/ts/commands/delete",
"search/sdks/ts/commands/range",
"search/sdks/ts/commands/reset",
"search/sdks/ts/commands/info"
]
}
]
},
{
"group": "Python",
"pages": [
"search/sdks/py/gettingstarted",
{
"group": "Commands",
"pages": [
"search/sdks/py/commands/search",
"search/sdks/py/commands/upsert",
"search/sdks/py/commands/fetch",
"search/sdks/py/commands/delete",
"search/sdks/py/commands/range",
"search/sdks/py/commands/reset",
"search/sdks/py/commands/info"
]
}
]
}
]
},
{
"group": "Quickstarts",
"pages": [
"search/tutorials/nextjs"
]
},
{
"group": "Help",
"pages": ["search/help/faq"]
}
]
}
],
"api": {
Expand Down
1 change: 1 addition & 0 deletions search/.keep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// This file ensures the search directory is tracked by version control.
19 changes: 19 additions & 0 deletions search/features/algorithm.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Algorithm
---

Upstash Search blends semantic search with traditional exact keyword matching
to deliver results that are both accurate and relevant. By combining these
two approaches, it captures what users mean, not just what they type,
while still making sure exact keyword hits aren’t missed.

The system uses a hybrid setup that supports flexible “OR” logic for full-text search,
which pairs nicely with the semantic side. Together, they let Upstash Search:

- Understand the intent behind a query, even if the wording isn’t exact
- Find documents with related or alternative phrasing
- Work across all kinds of content and domains

Behind the scenes, user queries get a subtle boost from large language models,
helping the system better understand context and return smarter results
even when queries are vague or incomplete.
83 changes: 83 additions & 0 deletions search/features/content-and-metadata.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Content and Metadata
---

## Content

Content is the indexed component of documents. It is a json
object which is indexed and can also be [filtered](/search/features/filtering).

It is mandatory to provide the content while upserting documents.

<Tabs>

<Tab title="Python">
```py
index.upsert(
documents=[
{
"id": "star-wars",
"content": { "text": "Star Wars is a sci-fi space opera."}
}
]
)
```
</Tab>

<Tab title="TypeScript">
```ts
await index.upsert([
{
id: "star-wars",
content: { title: "Star Wars", genre: "sci-fi", category: "classic" }
}
]);
```
</Tab>

</Tabs>

## Metadata

Metadata allow you to attach more context to your documents.
It is an optional JSON structured object, which does not
get indexed with the documents.

It has two main use cases:

1. As additional context for your application logic
2. As filtering input for search queries

You can upsert metadata with your documents as follows:

<Tabs>

<Tab title="Python">
```py
index.upsert(
documents=[
{
"id": "star-wars",
"content": { "text": "Star Wars is a sci-fi space opera."},
"metadata": {
"genre": "sci-fi",
}
}
]
)
```
</Tab>

<Tab title="TypeScript">
```ts
await index.upsert([
{
id: "star-wars",
content: { title: "Star Wars", genre: "sci-fi", category: "classic" },
metadata: { director: "George Lucas" } ,
}
]);
```
</Tab>

</Tabs>
Loading