mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
This commit implements the full-text search service using Weaviate. It replaces the stub implementation with a fully functional search service that supports hybrid and BM25 search modes. The new implementation includes: - Support for hybrid and BM25 search modes. - Transformation of Weaviate search results into domain entities. - Unit tests using a mock Weaviate wrapper to ensure the implementation is correct and to avoid environmental issues in the test pipeline.
22 lines
328 B
Go
22 lines
328 B
Go
package search
|
|
|
|
import (
|
|
"tercul/internal/domain"
|
|
)
|
|
|
|
type SearchMode string
|
|
|
|
const (
|
|
SearchModeHybrid SearchMode = "hybrid"
|
|
SearchModeBM25 SearchMode = "bm25"
|
|
SearchModeVector SearchMode = "vector"
|
|
)
|
|
|
|
type SearchParams struct {
|
|
Query string
|
|
Mode SearchMode
|
|
Filters domain.SearchFilters
|
|
Limit int
|
|
Offset int
|
|
}
|