Expand description
Backbone Framework Search Module
Provides search functionality with Elasticsearch and Algolia support.
§Features
- Elasticsearch Backend: Full-text search with advanced queries
- Algolia Backend: Fast search-as-a-service integration
- Index Management: Create, update, delete search indices
- Document Operations: Index, update, delete documents
- Advanced Search: Full-text, fuzzy, faceted, and geo search
- Analytics: Search analytics and performance metrics
- Async/Await: Full async support with tokio
- Multi-index Support: Search across multiple indices
§Quick Start
ⓘ
use backbone_search::{SearchService, ElasticsearchSearch, SearchQuery, SearchDocument};
// Elasticsearch search service
let search = ElasticsearchSearch::new("http://localhost:9200").await?;
// Create index
search.create_index("products", None).await?;
// Index document
let doc = SearchDocument::builder()
.id("product-1")
.content("Wireless headphones with noise cancellation")
.field("category", "electronics")
.field("price", 299.99)
.build();
search.index_document("products", doc).await?;
// Search documents
let query = SearchQuery::builder()
.text("headphones")
.filter("category", "electronics")
.build();
let results = search.search("products", query).await?;Re-exports§
pub use traits::*;pub use types::*;pub use elasticsearch::*;pub use algolia::*;
Modules§
- algolia
- Algolia search implementation
- elasticsearch
- Elasticsearch search implementation
- traits
- Search service traits
- types
- Search types and structures
Structs§
- Search
Config - Search configuration
- Search
Stats - Search statistics
Enums§
- Search
Backend - Search backend types
- Search
Error - Search error types
Constants§
- DEFAULT_
INDEX_ NAME - Default index name
- DEFAULT_
SEARCH_ LIMIT - Default search limit
- MAX_
DOCUMENT_ SIZE - Maximum document size (100MB for Elasticsearch)
- MAX_
SEARCH_ LIMIT - Maximum search limit
- VERSION
- Search module version
Type Aliases§
- Search
Result - Result type for search operations