@abeedoo/radish-schemas 1.8.0 → 1.9.0
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.
- package/index.js +1 -1
- package/package.json +1 -1
- package/prompts/radish-types-generation.md +7 -1
- package/schemas/types.schema.json +21 -2
package/index.js
CHANGED
|
@@ -31,7 +31,7 @@ export {
|
|
|
31
31
|
* @property {string} minCliVersion - Minimum radish-cli version compatible with this package
|
|
32
32
|
*/
|
|
33
33
|
export const VERSIONING = {
|
|
34
|
-
packageVersion: '1.
|
|
34
|
+
packageVersion: '1.9.0',
|
|
35
35
|
currentSpecVersion: 1,
|
|
36
36
|
supportedSpecVersions: [1],
|
|
37
37
|
minCliVersion: '0.1.0'
|
package/package.json
CHANGED
|
@@ -163,7 +163,12 @@ The following entities are already provided by the system. DO NOT recreate them
|
|
|
163
163
|
"engine": "typesense",
|
|
164
164
|
"indexName": "products",
|
|
165
165
|
"fields": {
|
|
166
|
-
"searchable": [
|
|
166
|
+
"searchable": [
|
|
167
|
+
{ "field": "name", "stem": true },
|
|
168
|
+
{ "field": "description", "stem": true },
|
|
169
|
+
"sku",
|
|
170
|
+
"brand"
|
|
171
|
+
],
|
|
167
172
|
"filterable": ["brand", "price", "categories"],
|
|
168
173
|
"sortable": ["price", "name", "createdAt"],
|
|
169
174
|
"facetable": ["brand", "categories"]
|
|
@@ -182,6 +187,7 @@ The following entities are already provided by the system. DO NOT recreate them
|
|
|
182
187
|
- **indexName**: Custom index name (defaults to entity plural)
|
|
183
188
|
- **sync**: `inline` (immediate) or `background` (via jobs)
|
|
184
189
|
- **vector**: Enable vector/embedding search with `sourceFields` to generate embeddings from
|
|
190
|
+
- **searchable**: Each entry is either a plain field name or `{ "field": "name", "stem": true }`. Stemming reduces terms to their word stems at index time (`computers` → `computer`), so a plural query matches singular text as an exact match rather than relying on typo correction. Set `stem: true` only on prose fields (name, description, summary, body). Never stem identifiers (`sku`, `slug`, `code`), brand or category values, anything listed under `filterable`/`facetable`, or non-string fields — stemming a facet value breaks the filter that reads it.
|
|
185
191
|
|
|
186
192
|
13. **Expiration / TTL** (optional): For entities whose records should be purged automatically (sessions, tokens, logs, temporary uploads), use the entity-level `ttl` shorthand:
|
|
187
193
|
```json
|
|
@@ -114,8 +114,27 @@
|
|
|
114
114
|
"properties": {
|
|
115
115
|
"searchable": {
|
|
116
116
|
"type": "array",
|
|
117
|
-
"items": {
|
|
118
|
-
|
|
117
|
+
"items": {
|
|
118
|
+
"oneOf": [
|
|
119
|
+
{ "type": "string" },
|
|
120
|
+
{
|
|
121
|
+
"type": "object",
|
|
122
|
+
"required": ["field"],
|
|
123
|
+
"additionalProperties": false,
|
|
124
|
+
"properties": {
|
|
125
|
+
"field": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"description": "Field name"
|
|
128
|
+
},
|
|
129
|
+
"stem": {
|
|
130
|
+
"type": "boolean",
|
|
131
|
+
"description": "Reduce terms to their word stems at index time so plural queries match singular text. Prose fields only — never identifiers, facets, or non-string fields, since stemming a facet value breaks the filter that reads it."
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
"description": "Fields included in full-text search queries. Either a field name, or an object with per-field options such as stemming."
|
|
119
138
|
},
|
|
120
139
|
"filterable": {
|
|
121
140
|
"type": "array",
|