Skip to content

[Bug]: HybridSearch crashes on empty results from OceanBase #53

@longbingljw

Description

@longbingljw

Describe the bug

OceanBase returns NULL for empty results. pyobvector doesn't handle this.
When DBMS_HYBRID_SEARCH.SEARCH returns NULL (which happens when there are no matching results), HybridSearch.search() attempts to call json.loads(None), causing a TypeError.

Environment

0.2.18

Fast reproduce steps

from pyobvector.client.hybrid_search import HybridSearch

Connect to OceanBase

hs = HybridSearch(
uri="127.0.0.1:2881",
user="root@test",
password="password",
db_name="test"
)

result = hs.search(
index="test_table",
body={"query": {"match": {"content": "nonexistent_xyz123"}}}
)

Expected behavior

pyobvector handles empty results when they are NULL.

Actual behavior

TypeError: the JSON object must be str, bytes or bytearray, not NoneType

Additional context

No response

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