I’m having issues with using the freshness boosting feature from Vertex AI Search. I’m following this guide: https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results?cloudshell=false
This is my schema in the data store:
I’m using the following request:
curl -X POST -H “Authorization: Bearer $(gcloud auth print-access-token)”
-H “Content-Type: application/json”
“https://discoveryengine.googleapis.com/v1alpha/projects/PROJECT_ID/locations/global/collections/default_collection/dataStores/DATASTORE_ID/servingConfigs/default_search:search”
-d ‘{
“query”:“cancel”,
“pageSize”:10,
“queryExpansionSpec”:{
“condition”:“AUTO”
},
“spellCorrectionSpec”:{
“mode”:“AUTO”
},
“boostSpec”:{
“conditionBoostSpecs”:{
“condition”:“true”,
“boostControlSpec”:{
“fieldName”:“date”,
“attributeType”:“FRESHNESS”,
“interpolationType”:“LINEAR”,
“controlPoints”:[
{
“attributeValue”:“7d”,
“boostAmount”:0.9
},
{
“attributeValue”:“30d”,
“boostAmount”:0.7
},
{
“attributeValue”:“60d”,
“boostAmount”:0.4
},
{
“attributeValue”:“90d”,
“boostAmount”:0
}
]
}
}
}
}’
Although the data field is present and is set as DATETIME, I’m getting this error:
{
“error”: {
“code”: 400,
“message”: “Unknown field specified in BoostControlSpec: date”,
“status”: “INVALID_ARGUMENT”
}
}
I did a sanity check with the ‘subject’ field to make sure it has access to ‘date’, it works as expected.
{
“error”: {
“code”: 400,
“message”: " Non-datetime field specified in BoostControlSpec with AttributeType FRESHNESS: subject",
“status”: “INVALID_ARGUMENT”
}
}
Any ideas what’s going on?
