Skip to content

SearchRequest cannot be inherited #4552

@PhoenixMiao

Description

@PhoenixMiao

Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.

Expected Behavior

I need attributes in SearchRequest and SearchRequest.Builder be protected which can be inherited and expand in subclass

Current Behavior

Attributes in SearchRequest and SearchRequest.Builder are private. I need to define a seires of attributes that identical with original Class to construct my own XXXSearchRequest, which holds total different variables of same name (topk, similarityThreshold...).

Context

Why attributes in SearchRequest and Searchrequest.Builder is private? which means I need to define a seires of attributes that identical with original Class to construct my own XXXSearchRequest. I used to put my expanded attributes in vectorStore, but I cannot always let users to determine the arguments of search when they build the vector store, I need to pass them in SearchRequest. But it bothers me when I found out SearchRequest not suitable for inheritation.

Attach my ArkSearchRequest, which a series of attributes of same name in SearchRequest are defined again.

ArkSearchRequest.java

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions