Skip to content

FunctionType.TEXTEMBEDDING is incorrectly parsed as TextEmbedding, resulting in the error: java.lang.IllegalArgumentException: No enum constant io.milvus.common.clientenum.FunctionType.TextEmbedding #1534

@FbyBruce

Description

@FbyBruce

When using FunctionType.TEXTEMBEDDING in the milvus-sdk-java 2.6.1 , the generated function type string is incorrectly set to "TextEmbedding" , as a result, the enumeration item TextEmbedding cannot be found in the io.milvus.common.clientenum.FunctionType package.
For example:
schema.addFunction(Function.builder() .name("siliconflow_embedding") .functionType(FunctionType.TEXTEMBEDDING) )
The above code internally sets the function type as "TextEmbedding", which is not recognized by Milvus.
This appears to be due to incorrect string mapping in the FunctionType enum—likely a missing explicit toString() override or improper annotation for serialization.
This issue prevents proper use of text embedding functions and may affect other functionality relying on correct function type names.
Could you please confirm if this is a known issue or consider fixing the enum string representation?
Thanks!

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