tigrisdata-archive / tigris

Tigris is an Open Source Serverless NoSQL Database and Search Platform.

Home Page:https://www.tigrisdata.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: object type of schema fields are not available for field inclusion/exclusion in Search

adilansari opened this issue · comments

Describe the bug

Objects in schema are not available for field inclusion/exclusion when making search queries with include_fields or exclude_fields

To Reproduce

1. Create standalone search index

{
    "title": "catalog",
    "additionalProperties": false,
    "type": "object",
    "properties": {
        "id": {"type": "string"},
        "name": {"type": "string"},
        "review": {
            "type": "object",
            "properties": {
                "author": {"type": "string"},
                "rating": {"type": "number"}
            }
        }
    }
}

2. Send a search query with review included in include_fields or exclude_fields

query = Query(include_fields=["id", "review"])
results =  self.index.search(query)

throws following error:

grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "Field `review` is not present in collection"
	debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-05-24T12:40:23.454598-07:00", grpc_status:3, grpc_message:"Field `review` is not present in collection"}"

Same happens for exclude fields

Expected behavior

  • review should be included/excluded

  • Also the message should not say is not present in Collection, as I am querying on a search index (but that's not a dealbreaker)

  • Version [e.g. 22] - beta.108