Search Overview
Unbody provides several search methods to help you find relevant content in your data. Each method serves a different purpose and can be used alone or in combination with others.
Available Methods
Semantic Search
Search based on meaning rather than exact matches
Keyword Search
Search using exact keyword matches
Hybrid Search
Combine semantic and keyword search
Visual Similarity
Find visually similar images
Record Similarity
Find similar records
Basic Usage
All search methods follow a similar pattern:
// Using the SDK
const { data } = await unbody.get
.collection("TextDocument")
.search.about("my search query")
.exec();
// Using GraphQL
const query = `
query {
Get {
TextDocument(
nearText: {
concepts: ["my search query"]
}
) {
title
content
}
}
}
`;
Combining Search Methods
You can combine different search methods with filters, sorting, and pagination:
const { data } = await unbody.get
.collection("TextDocument")
.search.about("my search query")
.where({ category: "blog" })
.sort("createdAt", "desc")
.limit(10)
.exec();
Next Steps
Click on any search method above to learn more about its specific capabilities and usage.