search-engine-for-typesense 30.1.6.0 → 30.1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2107cc318bf6916c602aa10cd0804afc83f8148eac15b66572526644ffd10fd5
|
|
4
|
+
data.tar.gz: ef5327d92e2140487b6a407bba9b140aa5e70636f063aaa146e9345f6723eb87
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eef349f62ec8a29de651d8511f0d678bf874fff636ce566709c247464df5861da8257d1f95cfa7446a9d8f9ac6e35dd04ea6df13cd33c1511638dbf27f46801f
|
|
7
|
+
data.tar.gz: a5a72915fc94ee24751ac255bb5920d85d4f94da9dab0dbe53382456b017363de1d025bba46c6ac871e02d80bbbecc4f8c2d35a131430397d187716b21eb2c8e
|
data/README.md
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
# Search Engine for Typesense [![CI][ci-badge]][ci-url] [![Gem][gem-badge]][gem-url] [![Docs][docs-badge]][docs-url]
|
|
2
2
|
[](https://typesense.org) [](https://github.com/typesense/typesense-ruby)
|
|
3
3
|
|
|
4
|
-
> [!WARNING]
|
|
5
|
-
> **⚠️ This project is under maintenance – work in progress. APIs and docs may change. ⚠️**
|
|
6
|
-
|
|
7
4
|
Mountless Rails::Engine for [Typesense](https://typesense.org). Expressive Relation/DSL with JOINs, grouping, presets/curation — with strong DX and observability.
|
|
8
5
|
|
|
9
6
|
> [!NOTE]
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
# - CLI (Doctor): https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/cli
|
|
16
16
|
# - DX helpers: https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/dx
|
|
17
17
|
# - Configuration: https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/configuration
|
|
18
|
+
# - Vector search: https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/vector-search
|
|
18
19
|
SearchEngine.configure do |c|
|
|
19
20
|
c.host = ENV.fetch('TYPESENSE_HOST', 'localhost')
|
|
20
21
|
c.port = Integer(ENV.fetch('TYPESENSE_PORT', 8108))
|
|
@@ -82,6 +83,26 @@ SearchEngine.configure do |c|
|
|
|
82
83
|
# Override the logger used by the engine (defaults to Rails.logger). Example:
|
|
83
84
|
# c.logger = Rails.logger
|
|
84
85
|
|
|
86
|
+
# --- Embedding / Vector search -------------------------------------------
|
|
87
|
+
# See: https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/vector-search
|
|
88
|
+
|
|
89
|
+
# Default embedding model used by the `embedding` DSL macro when no
|
|
90
|
+
# per-field model: override is provided. Typesense ships built-in models
|
|
91
|
+
# (e.g. "ts/all-MiniLM-L12-v2"); remote providers like OpenAI are also
|
|
92
|
+
# supported — set api_key below or per-field.
|
|
93
|
+
# c.embedding.model = 'ts/all-MiniLM-L12-v2'
|
|
94
|
+
|
|
95
|
+
# API key for remote embedding providers (e.g. OpenAI). Keep in ENV.
|
|
96
|
+
# c.embedding.api_key = ENV['EMBEDDING_API_KEY']
|
|
97
|
+
|
|
98
|
+
# Extra model_config merged into every Typesense embed block.
|
|
99
|
+
# c.embedding.model_config = {}
|
|
100
|
+
|
|
101
|
+
# Tolerance for vector_search weights sum validation (weights must sum
|
|
102
|
+
# to ~1.0 within this tolerance). Raise when many small weights cause
|
|
103
|
+
# floating-point drift. Default: 0.01
|
|
104
|
+
# c.embedding.weights_sum_tolerance = 0.01
|
|
105
|
+
|
|
85
106
|
# --- Presets -------------------------------------------------------------
|
|
86
107
|
# See: https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/presets
|
|
87
108
|
|
|
@@ -125,6 +146,11 @@ SearchEngine.configure do |c|
|
|
|
125
146
|
# c.observability.include_error_messages = false
|
|
126
147
|
# c.observability.emit_legacy_event_aliases = true
|
|
127
148
|
|
|
149
|
+
# Redact raw float arrays inside vector_query strings in logs/telemetry.
|
|
150
|
+
# When true (default), vectors are replaced with [<N dims>].
|
|
151
|
+
# Set to false to see raw vectors for debugging.
|
|
152
|
+
# c.observability.redact_vectors = true
|
|
153
|
+
|
|
128
154
|
# OpenTelemetry integration (only when the SDK is present). Defaults shown.
|
|
129
155
|
# c.opentelemetry = { enabled: false, service_name: 'search_engine' }
|
|
130
156
|
|
|
@@ -4,9 +4,18 @@
|
|
|
4
4
|
# Docs:
|
|
5
5
|
# - https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/quickstart
|
|
6
6
|
# - https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/field-selection#guardrails--errors
|
|
7
|
+
# - https://nikita-shkoda.mintlify.app/projects/search-engine-for-typesense/v30.1/vector-search
|
|
7
8
|
class SearchEngine::<%= class_name %> < SearchEngine::Base
|
|
8
9
|
collection "<%= @collection_name %>"
|
|
9
10
|
<% Array(@attributes).each do |(name, type)| -%>
|
|
10
11
|
attribute :<%= name %>, :<%= type %>
|
|
11
12
|
<% end -%>
|
|
13
|
+
|
|
14
|
+
# --- Vector search (optional) ---
|
|
15
|
+
# Auto-embedding: Typesense generates vectors from the listed text fields.
|
|
16
|
+
# Requires config.embedding.model or a per-field model: override.
|
|
17
|
+
# embedding from: %i[name description]
|
|
18
|
+
#
|
|
19
|
+
# External embedding: bring your own vectors (num_dim required).
|
|
20
|
+
# embedding :my_vector, num_dim: 384, suffix: false
|
|
12
21
|
end
|