Skip to content
This repository was archived by the owner on Mar 5, 2026. It is now read-only.
This repository was archived by the owner on Mar 5, 2026. It is now read-only.

Opensearch min_score knn query #160

@monneyboi

Description

@monneyboi

When i try to query for min_score with filter i get the following error:

Error: Invalid response from opensearch. illegal_argument_exception: [knn] requires exactly one of k, distance or score to be set
    at get_nearest_chunks (/home/johan/Projects/insight-ui/src/routes/conversations/[id]/+page.server.ts:160:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async create_prompt (/home/johan/Projects/insight-ui/src/routes/conversations/[id]/+page.server.ts:213:28)
    at async handle_action_json_request (/home/johan/Projects/insight-ui/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js:53:16)
    at async resolve (/home/johan/Projects/insight-ui/node_modules/@sveltejs/kit/src/runtime/server/respond.js:476:18)
    at async respond (/home/johan/Projects/insight-ui/node_modules/@sveltejs/kit/src/runtime/server/respond.js:349:20)
    at async file:///home/johan/Projects/insight-ui/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:549:22

With k this works fine. Investigate opensearch source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions