Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adilansari opened this issue May 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@adilansari
Copy link
Contributor

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

@adilansari adilansari added the bug Something isn't working label May 24, 2023
@adilansari adilansari moved this to 📋 Backlog in Tigris May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant