When I am trying to search using metadata in the document library getting the below error
However, whenever I am searching on the OOTB Modern SPO search page, it's giving me the result using same metadata.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
I can reproduce your issue.
The error is in response to the View setting of list. You unknowingly was attempting to have many Lookup columns in a single View.
SharePoint Online limits the number of lookup column. Lists created prior to the June 2013 CU update are capped at 8 lookup columns, while those afterward are allowed 12.
Although the official said can have 12 Lookup fields under a single View. But in my test environment, the number of Lookup fields cannot exceed 10, otherwise an error will occur.
Once I edited the view to only contain a few Lookup columns in the default, the problem stopped.