glmvrml
glmvrml

Reputation: 1632

Appengine Search API - InvalidRequest

I'm using Search API (https://cloud.google.com/appengine/docs/standard/python/search/) on Google App Engine Python Standard Environment.

In my app I have several search indexes and query them with cursor pagination (paging pagination can't return more than 1000 results) https://cloud.google.com/appengine/docs/standard/python/search/cursorclass

Sometimes I randomly get following exception:

InvalidRequest: Failed to execute search request "<search query>"

with no further details. If I get It in the middle of some query, It is going to reproduce forever with such cursor.

  1. Item set is immutable between requests (no items are added or deleted)
  2. First page of query is always ok (exception occurs only if I query with cursor)
  3. I'm not using any sorting
  4. Cursors are exact same as received by previous query and are not corrupted between requests

Any ideas how to solve this?

related:

https://issuetracker.google.com/issues/35898069

https://issuetracker.google.com/issues/35895008

https://groups.google.com/forum/#!topic/google-appengine/tBHkZLeYTOI

What does this error message mean in appengine?

Upvotes: 1

Views: 206

Answers (1)

glmvrml
glmvrml

Reputation: 1632

Finally, we were able to find out what were causing random errors.

  1. Make first request "A=1 AND B=2" and receive <cursor>
  2. Make second request with <cursor> "A=1 AND B=2" - works OK
  3. Make second request with <cursor> "B=2 AND A=1" - same request, but parameters order does not match original query - InvalidRequest with no explanation.

Upvotes: 1

Related Questions