diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index e2fb139b..05449999 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -77,6 +77,12 @@ jobs: files: | **.cs + - name: Check XML param docs (query/generate API) + if: steps.changed-files.outputs.any_changed == 'true' + run: | + python3 ci/test_check_xml_param_docs.py + python3 ci/check_xml_param_docs.py + - name: Setup .NET uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5 with: diff --git a/ci/check_xml_param_docs.py b/ci/check_xml_param_docs.py new file mode 100755 index 00000000..0a717166 --- /dev/null +++ b/ci/check_xml_param_docs.py @@ -0,0 +1,358 @@ +#!/usr/bin/env python3 +"""Fail when public query/generate methods document a summary but not their parameters. + +CS1573 only fires when some parameters are documented but not all; CS1591 only +fires when the method has no doc comment at all. Methods with a and +zero tags (Hybrid before this fix) slip through both. This check closes +that gap for the query/generate client surface. + +Declarations are located with a small brace/paren scanner rather than a single +regex: a regex cannot balance the nested parentheses that appear in real +signatures (``= default(CancellationToken)``), in tuple return types +(``Task<(int, string)>``), or in attribute arguments. +""" + +from __future__ import annotations + +import re +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[1] +CLIENT_ROOT = ROOT / "src" / "Weaviate.Client" + +# Query/generate API partials (excludes TypedDataClient and other surfaces). +SCOPED_PREFIXES = ( + "QueryClient.", + "GenerateClient.", + "Typed/TypedQueryClient.", + "Typed/TypedGenerateClient.", +) + +DOC_RUN_RE = re.compile(r"(?:[ \t]*///.*\n)+") + +# Trailing identifier of a declaration header, optionally generic: `Hybrid`. +NAME_RE = re.compile(r"(?P\w+)\s*(?P<[^<>()]*>)?\s*$") + +# A header must look like a declaration, not a random expression. +HEADER_SANITY_RE = re.compile(r"^[\w\s<>\[\],\.\?\(\):@]+$") + +# Only the public surface is in scope (private helpers may document a summary +# alone). This mirrors the `public` requirement the original regex encoded. +PUBLIC_RE = re.compile(r"\bpublic\b") + +# A method can never be named with a reserved word. Without this, the `new()` +# in a type constraint (`class Foo where T : class, new()`) parses as a +# zero-parameter method called `new`. +RESERVED_NAMES = frozenset( + { + "new", + "class", + "struct", + "record", + "interface", + "enum", + "where", + "return", + "if", + "switch", + "while", + "for", + "foreach", + "lock", + "using", + "catch", + "fixed", + "nameof", + "typeof", + "sizeof", + "default", + "base", + "this", + "get", + "set", + "init", + } +) + +# How far past a doc comment we are willing to look for the `(`. +MAX_HEADER_SCAN = 800 + + +def is_scoped(path: Path, client_root: Path = CLIENT_ROOT) -> bool: + rel = path.relative_to(client_root).as_posix() + return any(rel.startswith(prefix) for prefix in SCOPED_PREFIXES) + + +def _skip_literal(text: str, i: int) -> int: + """text[i] starts a string/char literal. Return the index just past it.""" + if text.startswith('@"', i): + i += 2 + while i < len(text): + if text[i] == '"': + if text.startswith('""', i): + i += 2 + continue + return i + 1 + i += 1 + return i + quote = text[i] + i += 1 + while i < len(text): + if text[i] == "\\": + i += 2 + continue + if text[i] == quote: + return i + 1 + i += 1 + return i + + +def _match_bracket(text: str, i: int, open_ch: str, close_ch: str) -> int: + """text[i] == open_ch. Return the index just past the matching close_ch. + + Literal-aware, so a bracket or paren inside a string does not unbalance it. + """ + depth = 0 + while i < len(text): + ch = text[i] + if ch in "\"'" or text.startswith('@"', i): + i = _skip_literal(text, i) + continue + if ch == open_ch: + depth += 1 + elif ch == close_ch: + depth -= 1 + if depth == 0: + return i + 1 + i += 1 + return -1 + + +def _skip_trivia_and_attributes(text: str, i: int) -> int: + """Skip whitespace, // and /* */ comments, and [attribute] blocks.""" + while i < len(text): + if text[i].isspace(): + i += 1 + elif text.startswith("//", i): + nl = text.find("\n", i) + i = len(text) if nl == -1 else nl + 1 + elif text.startswith("/*", i): + end = text.find("*/", i) + i = len(text) if end == -1 else end + 2 + elif text[i] == "[": + nxt = _match_bracket(text, i, "[", "]") + if nxt == -1: + return -1 + i = nxt + else: + return i + return i + + +def iter_declarations(text: str): + """Yield (docs, name, signature, offset) for every doc-commented declaration.""" + for run in DOC_RUN_RE.finditer(text): + docs = run.group(0) + i = _skip_trivia_and_attributes(text, run.end()) + if i == -1 or i >= len(text): + continue + + # Walk forward to the '(' that opens the parameter list. Angle brackets + # are tracked so `Task<(int, string)> Foo(` does not stop early, and a + # `;` or `{` before any '(' means this is a property/class, not a method. + j = i + angle = 0 + limit = min(len(text), i + MAX_HEADER_SCAN) + open_paren = -1 + while j < limit: + ch = text[j] + if ch in "\"'" or text.startswith('@"', j): + j = _skip_literal(text, j) + continue + if ch == "<": + angle += 1 + elif ch == ">": + angle = max(0, angle - 1) + elif ch == "(": + if angle == 0: + open_paren = j + break + # a tuple inside a generic return type: skip it wholesale + nxt = _match_bracket(text, j, "(", ")") + if nxt == -1: + break + j = nxt + continue + elif ch in ";{}" and angle == 0: + break + elif ( + angle == 0 + and text.startswith("where", j) + and not (j and (text[j - 1].isalnum() or text[j - 1] == "_")) + and not text[j + 5 : j + 6].isalnum() + ): + # A *type's* constraint clause; a method's `where` follows its + # parameter list, so reaching one first means this is a type. + break + j += 1 + + if open_paren == -1: + continue + + header = text[i:open_paren] + if not HEADER_SANITY_RE.match(header): + continue + if not PUBLIC_RE.search(header): + continue + name_match = NAME_RE.search(header) + if not name_match: + continue + + close_paren = _match_bracket(text, open_paren, "(", ")") + if close_paren == -1: + continue + sig = text[open_paren + 1 : close_paren - 1] + + # Must actually be a declaration: `where` clause, then =>, { or ; + tail = text[close_paren : close_paren + 400] + tail = re.sub(r"^\s*where\s+[^{;=]+", "", tail) + if not re.match(r"\s*(=>|\{|;)", tail): + continue + + name = name_match.group("name") + if name in RESERVED_NAMES: + continue + if name_match.group("generic"): + name += name_match.group("generic") + yield docs, name, sig, i + + +def split_top_level(signature: str) -> list[str]: + """Split a parameter list on commas that are not nested in <>, () or [].""" + parts: list[str] = [] + depth = 0 + start = 0 + i = 0 + while i < len(signature): + ch = signature[i] + if ch in "\"'" or signature.startswith('@"', i): + i = _skip_literal(signature, i) + continue + if ch in "<([": + depth += 1 + elif ch in ">)]": + depth = max(0, depth - 1) + elif ch == "," and depth == 0: + parts.append(signature[start:i]) + start = i + 1 + i += 1 + parts.append(signature[start:]) + return parts + + +def parse_param_names(signature: str) -> list[str]: + names: list[str] = [] + for part in split_top_level(signature): + part = part.strip() + if not part: + continue + part = re.sub(r"\[[^\]]*\]", "", part) + # Drop the default value; `= default(CancellationToken)` may hold a comma. + part = part.split("=")[0].strip() + part = re.sub(r"^this\s+", "", part) + tokens = part.split() + if tokens: + names.append(tokens[-1].lstrip("@")) + return names + + +def check_file(path: Path, root: Path = ROOT) -> tuple[list[str], int]: + text = path.read_text(encoding="utf-8") + rel = path.relative_to(root).as_posix() + issues: list[str] = [] + scanned = 0 + + for docs, method, sig, offset in iter_declarations(text): + scanned += 1 + if "" not in docs: + continue + + param_names = parse_param_names(sig) + if not param_names: + continue + + doc_params = re.findall(r' but no tags " + f"({len(param_names)} parameters)" + ) + continue + + missing = [name for name in param_names if name not in doc_params] + extra = [name for name in doc_params if name not in param_names] + if missing: + issues.append( + f"{rel}:{line}: {method} missing for: {', '.join(missing)}" + ) + if extra: + issues.append( + f"{rel}:{line}: {method} has undocumented extra tags: " + f"{', '.join(extra)}" + ) + + return issues, scanned + + +def main(root: Path = ROOT, client_root: Path = CLIENT_ROOT) -> int: + """Run the check. Roots are injectable so tests need not patch globals.""" + if not client_root.is_dir(): + print( + f"XML param doc check failed: client root not found at {client_root}", + file=sys.stderr, + ) + return 1 + + issues: list[str] = [] + files_scanned = 0 + declarations = 0 + for path in sorted(client_root.rglob("*.cs")): + if not is_scoped(path, client_root): + continue + files_scanned += 1 + file_issues, scanned = check_file(path, root) + issues.extend(file_issues) + declarations += scanned + + # A path/layout drift must fail loudly rather than silently pass forever. + if files_scanned == 0: + print( + "XML param doc check failed: scanned 0 files under " + f"{client_root} matching {', '.join(SCOPED_PREFIXES)}. " + "The check is misconfigured (did the layout move?).", + file=sys.stderr, + ) + return 1 + + if not issues: + print( + f"XML param docs OK: {declarations} declaration(s) in " + f"{files_scanned} file(s) matching {', '.join(SCOPED_PREFIXES)}" + ) + return 0 + + print( + f"XML param doc check failed ({len(issues)} issue(s) across " + f"{declarations} declaration(s) in {files_scanned} file(s)):", + file=sys.stderr, + ) + for issue in issues: + print(f" {issue}", file=sys.stderr) + return 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/ci/test_check_xml_param_docs.py b/ci/test_check_xml_param_docs.py new file mode 100644 index 00000000..7944b821 --- /dev/null +++ b/ci/test_check_xml_param_docs.py @@ -0,0 +1,250 @@ +#!/usr/bin/env python3 +"""Self-tests for check_xml_param_docs.py. + +Dependency-free (no pytest in this repo): run with `python3 ci/test_check_xml_param_docs.py`. +Each case pins one of the defects the checker previously had. +""" + +from __future__ import annotations + +import importlib.util +import io +import re +import tempfile +from contextlib import redirect_stderr, redirect_stdout +from pathlib import Path + +HERE = Path(__file__).resolve().parent + +_spec = importlib.util.spec_from_file_location("chk", HERE / "check_xml_param_docs.py") +assert _spec is not None, "could not build a module spec for check_xml_param_docs.py" +assert _spec.loader is not None, "module spec for check_xml_param_docs.py has no loader" +chk = importlib.util.module_from_spec(_spec) +_spec.loader.exec_module(chk) + +FAILURES: list[str] = [] + + +def check(label: str, condition: bool, detail: str = "") -> None: + if condition: + print(f" PASS {label}") + else: + print(f" FAIL {label}{(': ' + detail) if detail else ''}") + FAILURES.append(label) + + +def decls(source: str): + return list(chk.iter_declarations(source)) + + +# ---------------------------------------------------------------- defect 1 +# Generic methods were invisible: `(?P\w+)\s*\(` cannot match `Hybrid(`. +GENERIC_SRC = """ +public static class Ext +{ + /// + /// Performs a hybrid search. + /// + /// The client + public static Task Hybrid(this Client client, string query) + { + return null; + } +} +""" + + +def test_generic_methods() -> None: + print("defect 1 - generic methods are scanned") + found = decls(GENERIC_SRC) + names = [d[1] for d in found] + check("Hybrid is discovered", "Hybrid" in names, f"got {names}") + # and, being discovered, its missing param is reported + with tempfile.TemporaryDirectory() as td: + p = Path(td) / "QueryClient.Generic.cs" + p.write_text(GENERIC_SRC, encoding="utf-8") + issues, scanned = chk.check_file(p, root=Path(td)) + check( + "the generic overload is the one declaration counted in the file", + scanned == 1, + f"got {scanned}", + ) + check( + "undocumented 'query' on the generic overload is reported", + any("missing for: query" in i for i in issues), + f"got {issues}", + ) + + +# ---------------------------------------------------------------- defect 2 +# Splitting the parameter list on every comma turned `Dictionary` +# into a phantom parameter named `Dictionary None: + print("defect 2 - commas inside generic type arguments") + names = chk.parse_param_names( + "Dictionary filters, IList> pairs, int limit" + ) + check( + "generic args do not create phantom parameters", + names == ["filters", "pairs", "limit"], + f"got {names}", + ) + check( + "no phantom 'Dictionary None: + print("defect 3 - an empty scan fails loudly") + with tempfile.TemporaryDirectory() as td: + empty = Path(td) / "src" / "Weaviate.Client" + empty.mkdir(parents=True) + err = io.StringIO() + with redirect_stdout(io.StringIO()), redirect_stderr(err): + rc = chk.main(root=Path(td), client_root=empty) + check("exit code is non-zero when 0 files are scanned", rc != 0, f"rc={rc}") + check( + "message explains the misconfiguration", + "scanned 0 files" in err.getvalue(), + f"stderr={err.getvalue()!r}", + ) + + +def test_missing_client_root_fails() -> None: + print("defect 3b - a missing client root fails loudly") + with tempfile.TemporaryDirectory() as td: + err = io.StringIO() + with redirect_stdout(io.StringIO()), redirect_stderr(err): + rc = chk.main(root=Path(td), client_root=Path(td) / "does" / "not" / "exist") + check("exit code is non-zero when the client root is absent", rc != 0, f"rc={rc}") + check( + "message names the missing root", + "client root not found" in err.getvalue(), + f"stderr={err.getvalue()!r}", + ) + + +# ---------------------------------------------------------------- defect 4 +# Nested parens in a default value, a tuple return type, and parens/brackets +# inside an attribute string all defeated the `[^)]*` signature capture. +NESTED_SRC = """ +public class C +{ + /// Does a thing. + /// The query + /// The cancellation token + public Task WithDefaultParen( + string query, + CancellationToken cancellationToken = default(CancellationToken) + ) + { + return null; + } + + /// Does a thing. + /// The query + public Task<(int Count, string Name)> WithTupleReturn(string query) + { + return null; + } + + /// Does a thing. + /// The query + [Obsolete("use Other(x) instead [see docs]")] + public Task WithTrickyAttribute(string query) + { + return null; + } +} +""" + + +def test_nested_parens_and_attributes() -> None: + print("defect 4 - nested parens, tuple returns, tricky attributes") + found = {d[1]: d[2] for d in decls(NESTED_SRC)} + check( + "method with `= default(CancellationToken)` is scanned", + "WithDefaultParen" in found, + f"got {sorted(found)}", + ) + if "WithDefaultParen" in found: + names = chk.parse_param_names(found["WithDefaultParen"]) + check( + "its parameters parse correctly", + names == ["query", "cancellationToken"], + f"got {names}", + ) + check( + "method with a tuple return type is scanned", + "WithTupleReturn" in found, + f"got {sorted(found)}", + ) + check( + "method behind an attribute containing parens/brackets in a string is scanned", + "WithTrickyAttribute" in found, + f"got {sorted(found)}", + ) + + +# ------------------------------------------------- regression: no bad parses +TYPE_CONSTRAINT_SRC = """ +/// +/// The typed query client +/// +public partial class TypedQueryClient + where T : class, new() +{ +} +""" + + +def test_type_constraint_is_not_a_method() -> None: + print("regression - a type's `where T : class, new()` is not a method") + names = [d[1] for d in decls(TYPE_CONSTRAINT_SRC)] + check("no phantom `new` declaration", "new" not in names, f"got {names}") + + +def test_real_tree_is_clean() -> None: + print("integration - the real client tree passes") + out = io.StringIO() + with redirect_stdout(out), redirect_stderr(out): + rc = chk.main() + text = out.getvalue().strip() + check("checker exits 0 on the current tree", rc == 0, text) + m = re.search(r"(\d+) declaration\(s\) in (\d+) file\(s\)", text) + check("it reports what it scanned", m is not None, text) + if m: + check( + "it scanned a non-trivial number of declarations", + int(m.group(1)) > 100 and int(m.group(2)) > 10, + text, + ) + print(f" -> {m.group(1)} declarations in {m.group(2)} files") + + +def main() -> int: + for fn in ( + test_generic_methods, + test_generic_parameter_types, + test_empty_scan_fails, + test_missing_client_root_fails, + test_nested_parens_and_attributes, + test_type_constraint_is_not_a_method, + test_real_tree_is_clean, + ): + fn() + print() + if FAILURES: + print(f"FAILED ({len(FAILURES)}): {', '.join(FAILURES)}") + return 1 + print("all self-tests passed") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/src/Weaviate.Client.Tests/Integration/TestBoost.cs b/src/Weaviate.Client.Tests/Integration/TestBoost.cs index 30dcca47..bf85e1b9 100644 --- a/src/Weaviate.Client.Tests/Integration/TestBoost.cs +++ b/src/Weaviate.Client.Tests/Integration/TestBoost.cs @@ -3,7 +3,7 @@ namespace Weaviate.Client.Tests.Integration; /// -/// Integration tests for the Boost query parameter (soft-ranking, Weaviate 1.38+ Preview). +/// Integration tests for the Boost query parameter (soft-ranking, Weaviate 1.38+). /// public partial class SearchTests { @@ -107,7 +107,7 @@ private static List Labels(WeaviateResult result) => [Fact] public async Task Test_Boost_Filter_PromotesMatchingObjects() { - RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0 (Preview)"); + RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0"); var collection = await BoostCollectionFactory(); @@ -129,7 +129,7 @@ public async Task Test_Boost_Filter_PromotesMatchingObjects() [Fact] public async Task Test_Boost_NumericProperty_RanksByValue() { - RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0 (Preview)"); + RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0"); var collection = await BoostCollectionFactory(); @@ -149,7 +149,7 @@ public async Task Test_Boost_NumericProperty_RanksByValue() [Fact] public async Task Test_Boost_TimeDecay_PrefersRecentObjects() { - RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0 (Preview)"); + RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0"); var collection = await BoostCollectionFactory(); @@ -169,7 +169,7 @@ public async Task Test_Boost_TimeDecay_PrefersRecentObjects() [Fact] public async Task Test_Boost_NumericDecay_OnNearVector_PrefersClosestToOrigin() { - RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0 (Preview)"); + RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0"); var collection = await CollectionFactory( properties: Property.FromClass(), @@ -209,7 +209,7 @@ await collection.Data.Insert( [Fact] public async Task Test_Boost_Blend_WeighsConditions() { - RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0 (Preview)"); + RequireVersion("1.38.0", message: "Boost API requires Weaviate >= 1.38.0"); var collection = await BoostCollectionFactory(); diff --git a/src/Weaviate.Client/GenerateClient.BM25.cs b/src/Weaviate.Client/GenerateClient.BM25.cs index 5d321cb5..00c1a8bc 100644 --- a/src/Weaviate.Client/GenerateClient.BM25.cs +++ b/src/Weaviate.Client/GenerateClient.BM25.cs @@ -20,7 +20,7 @@ public partial class GenerateClient /// Offset for pagination /// BM25 search operator (AND/OR) /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -92,7 +92,7 @@ public async Task BM25( /// Offset for pagination /// BM25 search operator (AND/OR) /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. diff --git a/src/Weaviate.Client/GenerateClient.Hybrid.cs b/src/Weaviate.Client/GenerateClient.Hybrid.cs index fac76358..cdf0360b 100644 --- a/src/Weaviate.Client/GenerateClient.Hybrid.cs +++ b/src/Weaviate.Client/GenerateClient.Hybrid.cs @@ -11,6 +11,27 @@ public partial class GenerateClient /// /// Hybrid search with generative AI capabilities. /// + /// Text query for the keyword (BM25) half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task Hybrid( string query, float? alpha = null, @@ -62,6 +83,28 @@ public Task Hybrid( /// /// Hybrid search with generative AI capabilities. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task Hybrid( string? query, HybridVectorInput? vectors, @@ -127,6 +170,28 @@ public async Task Hybrid( /// /// Hybrid search with generative AI capabilities and grouping. /// + /// Text query for the keyword (BM25) half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task Hybrid( string query, GroupByRequest groupBy, @@ -180,6 +245,29 @@ public Task Hybrid( /// /// Hybrid search with generative AI capabilities and grouping. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task Hybrid( string? query, HybridVectorInput? vectors, @@ -264,6 +352,29 @@ public static class GenerateClientHybridExtensions /// singlePrompt: "Describe this item" /// ); /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task Hybrid( this GenerateClient client, string query, @@ -318,6 +429,30 @@ await client.Hybrid( /// Hybrid search with generative AI capabilities and grouping using a lambda to build HybridVectorInput. /// This allows chaining NearVector or NearText configuration with target vectors. /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task Hybrid( this GenerateClient client, string query, diff --git a/src/Weaviate.Client/GenerateClient.NearMedia.cs b/src/Weaviate.Client/GenerateClient.NearMedia.cs index fbe6c570..ea78f41b 100644 --- a/src/Weaviate.Client/GenerateClient.NearMedia.cs +++ b/src/Weaviate.Client/GenerateClient.NearMedia.cs @@ -31,7 +31,7 @@ public partial class GenerateClient /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -109,7 +109,7 @@ public async Task NearMedia( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. diff --git a/src/Weaviate.Client/GenerateClient.NearObject.cs b/src/Weaviate.Client/GenerateClient.NearObject.cs index d8ea4524..766dcd59 100644 --- a/src/Weaviate.Client/GenerateClient.NearObject.cs +++ b/src/Weaviate.Client/GenerateClient.NearObject.cs @@ -20,7 +20,7 @@ public partial class GenerateClient /// Auto-limit threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -94,7 +94,7 @@ public async Task NearObject( /// Auto-limit threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. diff --git a/src/Weaviate.Client/GenerateClient.NearText.cs b/src/Weaviate.Client/GenerateClient.NearText.cs index 37f28799..05fa8671 100644 --- a/src/Weaviate.Client/GenerateClient.NearText.cs +++ b/src/Weaviate.Client/GenerateClient.NearText.cs @@ -22,7 +22,7 @@ public partial class GenerateClient /// Auto-cut threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -98,7 +98,7 @@ public async Task NearText( /// Auto-cut threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -171,7 +171,7 @@ public async Task NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -239,7 +239,7 @@ public async Task NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -308,7 +308,7 @@ public async Task NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -366,7 +366,7 @@ await NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. diff --git a/src/Weaviate.Client/GenerateClient.NearVector.cs b/src/Weaviate.Client/GenerateClient.NearVector.cs index dee9a919..5d1fe2a0 100644 --- a/src/Weaviate.Client/GenerateClient.NearVector.cs +++ b/src/Weaviate.Client/GenerateClient.NearVector.cs @@ -11,6 +11,24 @@ public partial class GenerateClient /// /// Search near vector with generative AI capabilities. /// + /// The vector or named vectors to search near. + /// Filters to apply to the search. + /// Certainty threshold for the search: the minimum similarity a result must reach. If not specified, no threshold is applied. + /// Distance threshold for the search: the maximum distance a result may have from the query vector. If not specified, no threshold is applied. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task NearVector( VectorSearchInput vectors, Filter? filters = null, @@ -57,6 +75,25 @@ await _client.GrpcClient.SearchNearVector( /// /// Search near vector with generative AI capabilities and grouping. /// + /// The vector or named vectors to search near. + /// Group-by configuration. + /// Filters to apply to the search. + /// Certainty threshold for the search: the minimum similarity a result must reach. If not specified, no threshold is applied. + /// Distance threshold for the search: the maximum distance a result may have from the query vector. If not specified, no threshold is applied. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task NearVector( VectorSearchInput vectors, GroupByRequest groupBy, @@ -105,6 +142,24 @@ await _client.GrpcClient.SearchNearVector( /// /// Search near vector with generative AI capabilities using lambda builder. /// + /// Lambda builder for the vector input to search near. + /// Filters to apply to the search. + /// Certainty threshold for the search: the minimum similarity a result must reach. If not specified, no threshold is applied. + /// Distance threshold for the search: the maximum distance a result may have from the query vector. If not specified, no threshold is applied. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task NearVector( VectorSearchInput.FactoryFn vectors, Filter? filters = null, @@ -149,6 +204,25 @@ await NearVector( /// /// Search near vector with generative AI capabilities and grouping using lambda builder. /// + /// Lambda builder for the vector input to search near. + /// Group-by configuration. + /// Filters to apply to the search. + /// Certainty threshold for the search: the minimum similarity a result must reach. If not specified, no threshold is applied. + /// Distance threshold for the search: the maximum distance a result may have from the query vector. If not specified, no threshold is applied. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task NearVector( VectorSearchInput.FactoryFn vectors, GroupByRequest groupBy, @@ -197,20 +271,20 @@ await NearVector( /// /// Near-vector input containing vector, certainty, and distance. /// Filters to apply to the search. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. - /// Maximum number of results to return. - /// Number of results to skip. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Single prompt for generative AI. - /// Grouped task for generative AI. - /// Generative AI provider configuration. - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Generative search results. public async Task NearVector( NearVectorInput query, @@ -257,20 +331,20 @@ await NearVector( /// Near-vector input containing vector, certainty, and distance. /// Group-by configuration. /// Filters to apply to the search. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. - /// Maximum number of results to return. - /// Number of results to skip. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Single prompt for generative AI. - /// Grouped task for generative AI. - /// Generative AI provider configuration. - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Generative grouped search results. public async Task NearVector( NearVectorInput query, @@ -318,20 +392,20 @@ await NearVector( /// /// /// Filters to apply to the search. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. - /// Maximum number of results to return. - /// Number of results to skip. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Single prompt for generative AI. - /// Grouped task for generative AI. - /// Generative AI provider configuration. - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Generative search results. public async Task NearVector( NearVectorInput.FactoryFn vectors, @@ -376,20 +450,20 @@ await NearVector( /// /// Group-by configuration. /// Filters to apply to the search. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. - /// Maximum number of results to return. - /// Number of results to skip. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Single prompt for generative AI. - /// Grouped task for generative AI. - /// Generative AI provider configuration. - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Generative grouped search results. public async Task NearVector( NearVectorInput.FactoryFn vectors, diff --git a/src/Weaviate.Client/Models/Boost.cs b/src/Weaviate.Client/Models/Boost.cs index 162f65a9..731a97f8 100644 --- a/src/Weaviate.Client/Models/Boost.cs +++ b/src/Weaviate.Client/Models/Boost.cs @@ -19,7 +19,7 @@ namespace Weaviate.Client.Models; /// : combine several of the above, each with its own weight. /// /// -/// Preview feature: requires Weaviate 1.38 or later. Older servers silently ignore the boost. +/// Requires Weaviate 1.38 or later. Older servers silently ignore the boost. /// public sealed record Boost { diff --git a/src/Weaviate.Client/QueryClient.BM25.cs b/src/Weaviate.Client/QueryClient.BM25.cs index 536b3169..3a48111e 100644 --- a/src/Weaviate.Client/QueryClient.BM25.cs +++ b/src/Weaviate.Client/QueryClient.BM25.cs @@ -20,7 +20,7 @@ public partial class QueryClient /// The offset /// The search operator /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The after /// The consistency level /// The return properties @@ -81,7 +81,7 @@ await _grpc.SearchBM25( /// The offset /// The search operator /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The after /// The consistency level /// The return properties diff --git a/src/Weaviate.Client/QueryClient.Hybrid.cs b/src/Weaviate.Client/QueryClient.Hybrid.cs index 11341bc2..d590ac40 100644 --- a/src/Weaviate.Client/QueryClient.Hybrid.cs +++ b/src/Weaviate.Client/QueryClient.Hybrid.cs @@ -11,6 +11,24 @@ public partial class QueryClient /// /// Performs a hybrid search (keyword + vector search). /// + /// Text query for the keyword (BM25) half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task Hybrid( string query, float? alpha = null, @@ -56,6 +74,25 @@ public Task Hybrid( /// /// Performs a hybrid search (keyword + vector search). /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task Hybrid( string? query, HybridVectorInput? vectors, @@ -114,6 +151,25 @@ public async Task Hybrid( /// /// Performs a hybrid search (keyword + vector search) with grouping. /// + /// Text query for the keyword (BM25) half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task Hybrid( string query, GroupByRequest groupBy, @@ -161,6 +217,26 @@ public Task Hybrid( /// /// Performs a hybrid search (keyword + vector search) with grouping. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task Hybrid( string? query, HybridVectorInput? vectors, @@ -237,6 +313,26 @@ public static class QueryClientHybridExtensions /// ) /// ); /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task Hybrid( this QueryClient client, string? query = null, @@ -289,6 +385,27 @@ public static async Task Hybrid( /// Performs a hybrid search (keyword + vector search) with grouping using a lambda to build HybridVectorInput. /// This allows chaining NearVector or NearText configuration with target vectors. /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task Hybrid( this QueryClient client, string? query, diff --git a/src/Weaviate.Client/QueryClient.NearMedia.cs b/src/Weaviate.Client/QueryClient.NearMedia.cs index 0da1d2b1..cee77027 100644 --- a/src/Weaviate.Client/QueryClient.NearMedia.cs +++ b/src/Weaviate.Client/QueryClient.NearMedia.cs @@ -32,7 +32,7 @@ public partial class QueryClient /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -101,7 +101,7 @@ public async Task NearMedia( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -167,7 +167,7 @@ public async Task NearMedia( /// Automatic result cutoff threshold. /// Filters to apply to the search. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Target vectors factory function for multi-vector collections. /// Properties to return in the response. /// Cross-references to return. @@ -235,7 +235,7 @@ await _grpc.SearchNearMedia( /// Automatic result cutoff threshold. /// Filters to apply to the search. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Target vectors factory function for multi-vector collections. /// Properties to return in the response. /// Cross-references to return. diff --git a/src/Weaviate.Client/QueryClient.NearObject.cs b/src/Weaviate.Client/QueryClient.NearObject.cs index b5504ccc..597aa074 100644 --- a/src/Weaviate.Client/QueryClient.NearObject.cs +++ b/src/Weaviate.Client/QueryClient.NearObject.cs @@ -20,7 +20,7 @@ public partial class QueryClient /// The auto limit /// The filters /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The targets /// The return properties /// The return references @@ -84,7 +84,7 @@ await _grpc.SearchNearObject( /// The auto limit /// The filters /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The targets /// The return properties /// The return references diff --git a/src/Weaviate.Client/QueryClient.NearText.cs b/src/Weaviate.Client/QueryClient.NearText.cs index fd654855..c095ec67 100644 --- a/src/Weaviate.Client/QueryClient.NearText.cs +++ b/src/Weaviate.Client/QueryClient.NearText.cs @@ -10,22 +10,22 @@ public partial class QueryClient { /// Performs a near-text search using the specified parameters. /// The search text. - /// Certainty threshold for the search. - /// Distance threshold for the search. + /// Certainty threshold for the search: the minimum similarity a result must reach. If not specified, no threshold is applied. + /// Distance threshold for the search: the maximum distance a result may have from the query vector. If not specified, no threshold is applied. /// Move-to configuration. /// Move-away configuration. - /// Maximum number of results to return. - /// Number of results to skip. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. /// Filters to apply to the search. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Search results. public async Task NearText( AutoArray query, @@ -73,22 +73,22 @@ await _grpc.SearchNearText( /// Performs a near-text search with group-by using the specified parameters. /// The search text. /// Group-by configuration. - /// Certainty threshold for the search. - /// Distance threshold for the search. + /// Certainty threshold for the search: the minimum similarity a result must reach. If not specified, no threshold is applied. + /// Distance threshold for the search: the maximum distance a result may have from the query vector. If not specified, no threshold is applied. /// Move-to configuration. /// Move-away configuration. - /// Maximum number of results to return. - /// Number of results to skip. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. /// Filters to apply to the search. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Grouped search results. public async Task NearText( AutoArray query, @@ -149,17 +149,17 @@ await _grpc.SearchNearText( /// /// Lambda builder for creating NearTextInput with target vectors. /// Filters to apply to the search. - /// Maximum number of results to return. - /// Number of results to skip. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Search results. public async Task NearText( NearTextInput.FactoryFn query, @@ -210,17 +210,17 @@ public async Task NearText( /// Lambda builder for creating NearTextInput with target vectors. /// Group-by configuration. /// Filters to apply to the search. - /// Maximum number of results to return. - /// Number of results to skip. - /// Diversity selection to apply to the results. - /// Automatic result cutoff threshold. - /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) - /// Properties to return in the response. - /// Cross-references to return. - /// Metadata to include in the response. - /// Vector configuration for returned objects. - /// Cancellation token. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. /// Grouped search results. public async Task NearText( NearTextInput.FactoryFn query, @@ -275,6 +275,20 @@ public static class QueryClientNearTextExtensions /// /// Performs a near-text search using a NearTextInput record. /// + /// The client to run the search on. + /// The near-text input. + /// Filters to apply to the search. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task NearText( this QueryClient client, NearTextInput query, @@ -337,6 +351,21 @@ public static async Task NearText( /// /// Performs a near-text search with group-by using a NearTextInput record. /// + /// The client to run the search on. + /// The near-text input. + /// Group-by configuration. + /// Filters to apply to the search. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task NearText( this QueryClient client, NearTextInput query, diff --git a/src/Weaviate.Client/QueryClient.NearVector.cs b/src/Weaviate.Client/QueryClient.NearVector.cs index e01fcd35..3a149103 100644 --- a/src/Weaviate.Client/QueryClient.NearVector.cs +++ b/src/Weaviate.Client/QueryClient.NearVector.cs @@ -21,7 +21,7 @@ public partial class QueryClient /// The limit /// The offset /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The return properties /// The return references /// The return metadata @@ -80,7 +80,7 @@ await _grpc.SearchNearVector( /// The limit /// The offset /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The return properties /// The return references /// The return metadata @@ -140,7 +140,7 @@ await _grpc.SearchNearVector( /// The limit /// The offset /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The return properties /// The return references /// The return metadata @@ -196,7 +196,7 @@ await NearVector( /// The limit /// The offset /// The rerank - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// The return properties /// The return references /// The return metadata @@ -251,7 +251,7 @@ await NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -303,7 +303,7 @@ await NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -362,7 +362,7 @@ await NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -412,7 +412,7 @@ await NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. diff --git a/src/Weaviate.Client/Typed/TypedGenerateClient.BM25.cs b/src/Weaviate.Client/Typed/TypedGenerateClient.BM25.cs index 0923b618..617f8d4c 100644 --- a/src/Weaviate.Client/Typed/TypedGenerateClient.BM25.cs +++ b/src/Weaviate.Client/Typed/TypedGenerateClient.BM25.cs @@ -21,7 +21,7 @@ public partial class TypedGenerateClient /// Offset for pagination /// BM25 search operator (AND/OR) /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -92,7 +92,7 @@ public async Task> BM25( /// Offset for pagination /// BM25 search operator (AND/OR) /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. diff --git a/src/Weaviate.Client/Typed/TypedGenerateClient.Hybrid.cs b/src/Weaviate.Client/Typed/TypedGenerateClient.Hybrid.cs index f8b6bbbb..dd761b04 100644 --- a/src/Weaviate.Client/Typed/TypedGenerateClient.Hybrid.cs +++ b/src/Weaviate.Client/Typed/TypedGenerateClient.Hybrid.cs @@ -12,6 +12,27 @@ public partial class TypedGenerateClient /// /// Hybrid search with generative AI capabilities (query-only, no vectors). /// + /// Text query for the keyword (BM25) half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task> Hybrid( string query, float? alpha = null, @@ -63,6 +84,28 @@ public Task> Hybrid( /// /// Hybrid search with generative AI capabilities. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task> Hybrid( string? query, HybridVectorInput? vectors, @@ -118,6 +161,28 @@ public async Task> Hybrid( /// /// Hybrid search with generative AI capabilities and grouping (query-only, no vectors). /// + /// Text query for the keyword (BM25) half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task> Hybrid( string query, GroupByRequest groupBy, @@ -171,6 +236,29 @@ public Task> Hybrid( /// /// Hybrid search with generative AI capabilities and grouping. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task> Hybrid( string? query, HybridVectorInput? vectors, @@ -235,6 +323,29 @@ public static class TypedGenerateClientHybridExtensions /// Hybrid search with generative AI capabilities using a lambda to build HybridVectorInput. /// This allows chaining NearVector or NearText configuration with target vectors. /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task> Hybrid( this TypedGenerateClient client, string query, @@ -290,6 +401,30 @@ await client.Hybrid( /// Hybrid search with generative AI capabilities and grouping using a lambda to build HybridVectorInput. /// This allows chaining NearVector or NearText configuration with target vectors. /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Prompt run separately for each returned object. If not specified, no per-object generation is performed. + /// Prompt run once over the whole result set. If not specified, no grouped generation is performed. + /// Generative provider applied to prompts that do not carry one. Throws if a prompt already has a provider. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task> Hybrid( this TypedGenerateClient client, string query, diff --git a/src/Weaviate.Client/Typed/TypedGenerateClient.NearMedia.cs b/src/Weaviate.Client/Typed/TypedGenerateClient.NearMedia.cs index 7e13024b..8863ed31 100644 --- a/src/Weaviate.Client/Typed/TypedGenerateClient.NearMedia.cs +++ b/src/Weaviate.Client/Typed/TypedGenerateClient.NearMedia.cs @@ -32,7 +32,7 @@ public partial class TypedGenerateClient /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -101,7 +101,7 @@ public async Task> NearMedia( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. diff --git a/src/Weaviate.Client/Typed/TypedGenerateClient.NearObject.cs b/src/Weaviate.Client/Typed/TypedGenerateClient.NearObject.cs index 1a5dbf22..eb9d80e4 100644 --- a/src/Weaviate.Client/Typed/TypedGenerateClient.NearObject.cs +++ b/src/Weaviate.Client/Typed/TypedGenerateClient.NearObject.cs @@ -21,7 +21,7 @@ public partial class TypedGenerateClient /// Auto-limit threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -91,7 +91,7 @@ public async Task> NearObject( /// Auto-limit threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. diff --git a/src/Weaviate.Client/Typed/TypedGenerateClient.NearText.cs b/src/Weaviate.Client/Typed/TypedGenerateClient.NearText.cs index 0761b84b..1e962ede 100644 --- a/src/Weaviate.Client/Typed/TypedGenerateClient.NearText.cs +++ b/src/Weaviate.Client/Typed/TypedGenerateClient.NearText.cs @@ -23,7 +23,7 @@ public partial class TypedGenerateClient /// Auto-cut threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -96,7 +96,7 @@ public async Task> NearText( /// Auto-cut threshold /// Filters to apply /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider to enrich prompts that don't have a provider set. If the prompt already has a provider, it will not be overridden. @@ -166,7 +166,7 @@ public async Task> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -227,7 +227,7 @@ public async Task> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -289,7 +289,7 @@ public async Task> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -347,7 +347,7 @@ public Task> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. diff --git a/src/Weaviate.Client/Typed/TypedGenerateClient.NearVector.cs b/src/Weaviate.Client/Typed/TypedGenerateClient.NearVector.cs index f0842216..c626492c 100644 --- a/src/Weaviate.Client/Typed/TypedGenerateClient.NearVector.cs +++ b/src/Weaviate.Client/Typed/TypedGenerateClient.NearVector.cs @@ -21,7 +21,7 @@ public partial class TypedGenerateClient /// Maximum number of results /// Offset for pagination /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// @@ -88,7 +88,7 @@ public async Task> NearVector( /// Maximum number of results /// Offset for pagination /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// @@ -156,7 +156,7 @@ public async Task> NearVector( /// Maximum number of results /// Offset for pagination /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider @@ -220,7 +220,7 @@ public Task> NearVector( /// Maximum number of results /// Offset for pagination /// Rerank configuration - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generation /// Grouped prompt for generation /// Optional generative provider @@ -283,7 +283,7 @@ public Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -343,7 +343,7 @@ public Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -404,7 +404,7 @@ public Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. @@ -462,7 +462,7 @@ public Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Single prompt for generative AI. /// Grouped task for generative AI. /// Generative AI provider configuration. diff --git a/src/Weaviate.Client/Typed/TypedQueryClient.BM25.cs b/src/Weaviate.Client/Typed/TypedQueryClient.BM25.cs index 6f352ee4..87553397 100644 --- a/src/Weaviate.Client/Typed/TypedQueryClient.BM25.cs +++ b/src/Weaviate.Client/Typed/TypedQueryClient.BM25.cs @@ -21,7 +21,7 @@ public partial class TypedQueryClient /// Number of results to skip. /// BM25 search operator (AND/OR). /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Cursor for pagination. /// Consistency level for the query. /// Properties to return in the response. @@ -83,7 +83,7 @@ public async Task> BM25( /// Number of results to skip. /// BM25 search operator (AND/OR). /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Cursor for pagination. /// Consistency level for the query. /// Properties to return in the response. diff --git a/src/Weaviate.Client/Typed/TypedQueryClient.Hybrid.cs b/src/Weaviate.Client/Typed/TypedQueryClient.Hybrid.cs index 0b65cef8..852c34e3 100644 --- a/src/Weaviate.Client/Typed/TypedQueryClient.Hybrid.cs +++ b/src/Weaviate.Client/Typed/TypedQueryClient.Hybrid.cs @@ -12,6 +12,24 @@ public partial class TypedQueryClient /// /// Performs a hybrid search using keyword search only. /// + /// Text query for the keyword (BM25) half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task>> Hybrid( string query, float? alpha = null, @@ -57,6 +75,25 @@ public Task>> Hybrid( /// /// Performs a hybrid search combining keyword and vector search. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task>> Hybrid( string? query, HybridVectorInput? vectors, @@ -106,6 +143,25 @@ public async Task>> Hybrid( /// /// Performs a hybrid search with group-by aggregation using keyword search only. /// + /// Text query for the keyword (BM25) half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public Task> Hybrid( string query, GroupByRequest groupBy, @@ -153,6 +209,26 @@ public Task> Hybrid( /// /// Performs a hybrid search with group-by aggregation. /// + /// Text query for the keyword (BM25) half of the search. + /// Vector input for the vector half of the search. If not specified, the query text is vectorized and used. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public async Task> Hybrid( string? query, HybridVectorInput? vectors, @@ -230,6 +306,26 @@ public static class TypedQueryClientHybridExtensions /// ) /// ); /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task>> Hybrid( this TypedQueryClient client, string query, @@ -279,6 +375,27 @@ await client.Hybrid( /// Performs a hybrid search (keyword + vector search) with grouping using a lambda to build HybridVectorInput. /// Supports NearVector, NearText, or direct vector input via .Vectors(). /// + /// The client to run the search on. + /// Text query for the keyword (BM25) half of the search. + /// Lambda builder for the vector input used by the vector half of the search. + /// Group-by configuration. + /// Balance between the keyword and the vector half of the search: 0.0 is pure keyword (BM25), 1.0 is pure vector. If not specified, the server default of 0.75 is used, or 1.0 when no query text is given. + /// Properties the keyword (BM25) half of the search runs against. If not specified, all text properties are searched. + /// How the keyword and vector result sets are fused: Ranked adds inverted ranks, RelativeScore adds normalized scores. If not specified, the server default (RelativeScore) is used. + /// Maximum distance allowed for the vector half of the search. If not specified, no distance threshold is applied. + /// Maximum number of results to return. If not specified, the server default limit is used. + /// Number of results to skip. If not specified, results start from the first object. + /// Operator for the keyword (BM25) half of the search, setting how many query tokens a property must match. If not specified, the server default (Or) is used. + /// Diversity selection (MMR) to apply to the results. If not specified, no diversification is applied. + /// Automatic result cutoff (autocut): results stop after this many jumps in score or distance. If not specified, no cutoff is applied. + /// Filters to apply to the search. + /// Re-ranking configuration. Requires a reranker model integration on the collection. + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. + /// Properties to return in the response. If not specified, all non-blob properties are returned. + /// Cross-references to return. If not specified, no references are returned. + /// Metadata to include in the response. If not specified, no metadata is returned. + /// Vector configuration for returned objects. If not specified, no vectors are returned. + /// The cancellation token to monitor for cancellation requests. public static async Task> Hybrid( this TypedQueryClient client, string query, diff --git a/src/Weaviate.Client/Typed/TypedQueryClient.NearMedia.cs b/src/Weaviate.Client/Typed/TypedQueryClient.NearMedia.cs index 553331a7..e92ce998 100644 --- a/src/Weaviate.Client/Typed/TypedQueryClient.NearMedia.cs +++ b/src/Weaviate.Client/Typed/TypedQueryClient.NearMedia.cs @@ -26,7 +26,7 @@ public partial class TypedQueryClient /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -85,7 +85,7 @@ public async Task>> NearMedia( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. diff --git a/src/Weaviate.Client/Typed/TypedQueryClient.NearObject.cs b/src/Weaviate.Client/Typed/TypedQueryClient.NearObject.cs index 92f51842..561e77f3 100644 --- a/src/Weaviate.Client/Typed/TypedQueryClient.NearObject.cs +++ b/src/Weaviate.Client/Typed/TypedQueryClient.NearObject.cs @@ -21,7 +21,7 @@ public partial class TypedQueryClient /// Automatic result limit threshold. /// Filters to apply to the search. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Target vector configuration for named vectors. /// Properties to return in the response. /// Cross-references to return. @@ -82,7 +82,7 @@ public async Task>> NearObject( /// Automatic result limit threshold. /// Filters to apply to the search. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Target vector configuration for named vectors. /// Properties to return in the response. /// Cross-references to return. diff --git a/src/Weaviate.Client/Typed/TypedQueryClient.NearText.cs b/src/Weaviate.Client/Typed/TypedQueryClient.NearText.cs index 2c324e47..27797ca9 100644 --- a/src/Weaviate.Client/Typed/TypedQueryClient.NearText.cs +++ b/src/Weaviate.Client/Typed/TypedQueryClient.NearText.cs @@ -23,7 +23,7 @@ public partial class TypedQueryClient /// Automatic result cutoff threshold. /// Filters to apply to the search. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -87,7 +87,7 @@ public partial class TypedQueryClient /// Automatic result cutoff threshold. /// Filters to apply to the search. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -148,7 +148,7 @@ public async Task> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -200,7 +200,7 @@ public async Task>> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -253,7 +253,7 @@ public async Task> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -302,7 +302,7 @@ public Task>> NearText( /// Diversity selection to apply to the results. /// Automatic result cutoff threshold. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. diff --git a/src/Weaviate.Client/Typed/TypedQueryClient.NearVector.cs b/src/Weaviate.Client/Typed/TypedQueryClient.NearVector.cs index 39ae168a..4a806720 100644 --- a/src/Weaviate.Client/Typed/TypedQueryClient.NearVector.cs +++ b/src/Weaviate.Client/Typed/TypedQueryClient.NearVector.cs @@ -21,7 +21,7 @@ public partial class TypedQueryClient /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -79,7 +79,7 @@ public async Task>> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -138,7 +138,7 @@ public async Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -193,7 +193,7 @@ public Task>> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -247,7 +247,7 @@ public Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -298,7 +298,7 @@ public Task>> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -350,7 +350,7 @@ public Task> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response. @@ -399,7 +399,7 @@ public Task>> NearVector( /// Maximum number of results to return. /// Number of results to skip. /// Re-ranking configuration. - /// The boost for soft-ranking results. Preview: requires Weaviate 1.38+ (older servers silently ignore it) + /// Soft-ranking to apply to the results: promotes or demotes objects in the pool of candidates the search fetches, re-scoring them rather than excluding them the way a filter does. If not specified, no boost is applied. Requires Weaviate 1.38 or later; older servers silently ignore it. /// Properties to return in the response. /// Cross-references to return. /// Metadata to include in the response.