-
Notifications
You must be signed in to change notification settings - Fork 99
LCORE-2922: Regenerated devel doc #2452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2657,16 +2657,17 @@ | |
| }, | ||
| "SolrVectorSearchRequest": { | ||
| "additionalProperties": false, | ||
| "description": "LCORE Solr inline RAG options for vector_io.query (mode and provider filters).\n\nAttributes:\n mode: Solr vector_io search mode. When omitted, the server default (hybrid) is used.\n filters: Solr provider filter payload passed through as params['solr'].\n\nLegacy clients may send a plain JSON object with filter keys only;\nthat object is accepted as filters with mode unset (server default applies).", | ||
| "description": "LCORE Solr inline RAG options for vector_io.query (mode and provider filters).\n\nAttributes:\n mode: Solr vector_io search mode. When omitted, the configured OKP default is used.\n filters: Solr provider filter payload passed through as params['solr'].\n\nLegacy clients may send a plain JSON object with filter keys only;\nthat object is accepted as filters with mode unset (server default applies).", | ||
| "properties": { | ||
| "mode": { | ||
| "type": "string", | ||
| "nullable": true, | ||
| "default": null, | ||
| "description": "Solr vector_io search mode. When omitted, the server default ('hybrid') is used.", | ||
| "description": "Solr vector_io search mode. When omitted, the configured OKP default is used; otherwise 'hybrid' applies. 'keyword' and 'lexical' both use BM25 text search.", | ||
| "examples": [ | ||
| "hybrid", | ||
| "semantic", | ||
| "keyword", | ||
|
Comment on lines
+2666
to
+2670
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Update the parent The changed 🤖 Prompt for AI Agents |
||
| "lexical" | ||
| ], | ||
| "title": "Mode" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1194,7 +1194,7 @@ Examples: | |
| LCORE Solr inline RAG options for vector_io.query (mode and provider filters). | ||
|
|
||
| Attributes: | ||
| mode: Solr vector_io search mode. When omitted, the server default (hybrid) is used. | ||
| mode: Solr vector_io search mode. When omitted, the configured OKP default is used. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- docs/models/requests.md:1190-1210 ---'
cat -n docs/models/requests.md | sed -n '1190,1210p'
printf '%s\n' '--- src/utils/vector_search.py:562-636 ---'
cat -n src/utils/vector_search.py | sed -n '562,636p'
printf '%s\n' '--- related references ---'
rg -n -C 3 '_build_query_params|hybrid|filter-only|filter only|OKP default|server default|vector_io|mode:' docs src tests 2>/dev/null | head -300Repository: lightspeed-core/lightspeed-stack Length of output: 24055 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- implementation of _build_query_params ---'
cat -n src/utils/vector_search.py | sed -n '100,175p'
printf '%s\n' '--- constants and model definition references ---'
cat -n src/constants.py | sed -n '232,244p'
rg -n -C 4 'class SolrVectorSearchRequest|SolrVectorSearchRequest\(' src tests docs 2>/dev/null | head -240
printf '%s\n' '--- tests for query parameter construction ---'
rg -n -C 5 '_build_query_params|SOLR_VECTOR_SEARCH_DEFAULT_MODE|SolrVectorSearchRequest' tests 2>/dev/null | head -300Repository: lightspeed-core/lightspeed-stack Length of output: 33793 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import ast
from pathlib import Path
path = Path("src/utils/vector_search.py")
tree = ast.parse(path.read_text())
fn = next(
node for node in tree.body
if isinstance(node, ast.FunctionDef) and node.name == "_build_query_params"
)
# Print the resolved_mode assignment and its conditions without importing
# or executing repository code.
for node in ast.walk(fn):
if isinstance(node, ast.Assign):
target_names = [
target.id for target in node.targets if isinstance(target, ast.Name)
]
if "resolved_mode" in target_names:
print(ast.unparse(node))
PY
printf '%s\n' '--- model documentation ---'
cat -n src/models/common/query.py | sed -n '130,155p'
printf '%s\n' '--- focused tests for omitted mode ---'
cat -n tests/unit/utils/test_vector_search.py | sed -n '62,96p;188,220p'Repository: lightspeed-core/lightspeed-stack Length of output: 4854 🏁 Script executed: #!/bin/bash
set -eu
python3 - <<'PY'
import ast
from pathlib import Path
source = Path("src/utils/vector_search.py").read_text()
tree = ast.parse(source)
fn = next(
node for node in tree.body
if isinstance(node, ast.FunctionDef) and node.name == "_build_query_params"
)
resolved = [
node for node in ast.walk(fn)
if isinstance(node, ast.Assign)
and any(isinstance(target, ast.Name) and target.id == "resolved_mode"
for target in node.targets)
][0]
expr = resolved.value
names = {node.attr for node in ast.walk(expr) if isinstance(node, ast.Attribute)}
assert "mode" in names
assert "filters" not in names
def resolve(solr_mode, configured_mode, constant_mode="hybrid"):
return solr_mode if solr_mode is not None else (
configured_mode or constant_mode
)
cases = [
("no Solr object", None, None),
("legacy filter-only object", None, None),
("legacy filter-only object with configured keyword", None, "keyword"),
("explicit semantic mode", "semantic", "keyword"),
]
for label, solr_mode, configured_mode in cases:
print(f"{label}: {resolve(solr_mode, configured_mode)}")
print("resolved_mode does not inspect filters; omitted mode uses the configured mode, then the constant fallback.")
PYRepository: lightspeed-core/lightspeed-stack Length of output: 426 Document one fallback rule for omitted
🤖 Prompt for AI Agents |
||
| filters: Solr provider filter payload passed through as params['solr']. | ||
|
|
||
| Legacy clients may send a plain JSON object with filter keys only; | ||
|
|
@@ -1203,7 +1203,7 @@ that object is accepted as filters with mode unset (server default applies). | |
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | mode | string | Solr vector_io search mode. When omitted, the server default ('hybrid') is used. | | ||
| | mode | string | Solr vector_io search mode. When omitted, the configured OKP default is used; otherwise 'hybrid' applies. 'keyword' and 'lexical' both use BM25 text search. | | ||
| | filters | object | Solr provider filter payload passed through as params['solr']. Supports structured metadata filters (eq, ne, in, nin comparison operators). Legacy filter-only objects (e.g. fq) are still accepted. | | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Preserve the
SolrVectorSearchRequest.modeenum in both generated schemas.The runtime model accepts only
semantic,hybrid,lexical, andkeyword, but both JSON artifacts expose onlytype: string.docs/models/common.json#L1615-L1623: add the four-value enum tomode.docs/models/requests.json#L2662-L2670: add the same enum when regenerating the duplicate schema.📍 Affects 2 files
docs/models/common.json#L1615-L1623(this comment)docs/models/requests.json#L2662-L2670🤖 Prompt for AI Agents