Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Vertex AI Search: set spellCorrectionSpec for searchLite REST

I'm working on migrating from a Custom Site Search to Vertex AI Search using the REST API for seachLite using an API key.  I've got it working when not setting spellCorrectionSpec (taking the default) but when I add a setting for spellCorrectionSpec I get this error message:

"Invalid JSON payload received. Unknown name \"spellCorrectionSpec\": Cannot bind query parameter. 'spellCorrectionSpec' is a message type. Parameters can only be bound to primitive types."

Here is the JSON data I'm sending into the searchLite REST API:

 

 

{
  "query": "hamiltanian",
  "offset": 0,
  "pageSize": 10,
  "spellCorrectionSpec": {
    "mode": "AUTO"
  }
}

 

 

 

0 1 102
1 REPLY 1

Eventually I gave up on using the REST interface 😞 and re-implemented my code to use the Client Library interface.  That worked fine in a development environment.  Seems to be intermittently hanging in production, still investigating that.