Vectara search works but cURL times out

This search works fine in the Vectara web app but using the cURL generated by clicking on Inspect does not and I get this reponse: {"responseSet":[{"response":[], "status":[], "document":[], "generated":[], "summary":[], "futureId":1}], "status":[{"code":"QRY__TIMEOUT", "statusDetail":"Operation timed out. Results are partial.", "cause":null}], "metrics":null}

cURL request

-H "Authorization: [Bearer XXX]" \
-H "customer-id: 3279618736" \ \
-d @- <<END;
  "query": [
      "query": "Ongoing increases in the target range will be appropriate",
      "queryContext": "",
      "start": 0,
      "numResults": 10,
      "contextConfig": {
        "charsBefore": 0,
        "charsAfter": 0,
        "sentencesBefore": 2,
        "sentencesAfter": 2,
        "startTag": "%START_SNIPPET%",
        "endTag": "%END_SNIPPET%"
      "corpusKey": [
          "customerId": 3279618736,
          "corpusId": 2,
          "semantics": 0,
          "metadataFilter": "doc.country_iso_2='us' and>='2022-01-01' and<='2023-09-18'",
          "lexicalInterpolationConfig": {
            "lambda": 1
          "dim": []
      "summary": []


You can copy the correct cURL as per your environment by clicking on the Inspect button.

I tried that and the cURL does not work. I get the following:

{"responseSet":[{"response":[], "status":[], "document":[], "generated":[], "summary":[], "futureId":1}], "status":[{"code":"QRY__TIMEOUT", "statusDetail":"Operation timed out. Results are partial.", "cause":null}], "metrics":null}

Can you try replicating the example?

Can you please share your customer id and corpus id for which you are getting this? That will help us diagnose the problem better.

They’re in the cURL request I posted above.

customerId: 3279618736
corpusId: 2

Can you try with a timeout in the header like the following?

-H "grpc-timeout: 30S"

Also, I notice that you have set lambda to 1 which indicates that you are looking for only keyword-based search results. Keyword-based search results are generally slower than neural search. We are working on improving those.

From the Console:

Lambda ranges from 0 to 1. At the extremes, 0 will execute a search based solely on neural search and 1 will execute a search based solely on keyword-based search. Values in the range of 0.01 to 0.2 seem to work well for many cases.

Thanks, Aamir. Adding the timeout header solves things for now.