Unknown field specified in BoostControlSpec: date

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:
Screenshot 2024-04-15 at 10.22.34.png

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/defa..." \
-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?
10 7 332
7 REPLIES 7

Hello
There is no information to store it
Thank you

can you expand on this, what do you mean?

I mean that is your application informations is used for google cloud
platform.but you can use it with Google cloud accesseries

I don't really understand what you mean. Could you provide an example for how I should call that endpoint? what is wrong?

 

مرحبا

هذه الميزه خاصه لقوقل

يمكنك الاستعانه بملحقات قوقل السحابه

شكرا

تطبيقك يخضع لشروط قوقل ماقبل الذكاء الاصطناعي التوليدي  وما بعدها بعدد التطبيقات المحدود

Hi rolandgvc,

Fields that you specify in your boost control spec need to be marked as "indexable".

You can edit your schema to add the "indexable" property to your "date" field, which should fix the error message that you're getting after the reindexing finishes. Do note, it may take a few minutes after the schema update is complete for the error to go away.

Thanks,
Jason