Error occurs when searching using knowledge base metadata

There are almost twenty thousand files in my knowledge base, categorized by metadata. When searching the knowledge base using metadata, an error occurs.

Testing found that if the data volume is small, this query works fine, but when the data volume is large, the query cannot be performed.