Hello. I am getting the following issue in the ima...
# community-help
c
Hello. I am getting the following issue in the image. This should not happen since the field is definitely included in my schema.:
{
"created_at": 1730883369,
"default_sorting_field": "publishedAt",
"enable_nested_fields": true,
"fields": [
.....
{
"facet": true,
"index": true,
"infix": false,
"locale": "",
"name": "publishedAt",
"optional": false,
"sort": true,
"stem": false,
"store": true,
"type": "int64"
},
.....
],
"name": "Video_1730883369439",
"num_documents": 290000,
"symbols_to_index": [],
"token_separators": []
}
j
Could you right click on this request in the browser's network tab, copy-as-curl and paste it here (minus the API key)?
c
curl 'https://search.ytads.com/multi_search?x-typesense-api-key=XXXXXXX' \ -H 'accept: application/json, text/plain, */*' \ -H 'accept-language: en-US,en;q=0.9' \ -H 'content-type: text/plain' \ -H 'origin: http://localhost:3001' \ -H 'priority: u=1, i' \ -H 'referer: http://localhost:3001/' \ -H 'sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "Linux"' \ -H 'sec-fetch-dest: empty' \ -H 'sec-fetch-mode: cors' \ -H 'sec-fetch-site: cross-site' \ -H 'user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \ --data-raw '{"searches":[{"query_by":"title,ctaUrl,channelName,transcript,channelId","query_by_weights":"1,1,1,1,1","num_typos":3,"typo_tokens_threshold":1,"facet_by":"language,status,publishedAt","sort_by":"viewCount:asc","highlight_full_fields":"title,ctaUrl,channelName,transcript,channelId","collection":"AdVideo","q":"*","max_facet_values":10,"page":1}]}' @Jason Bosco
f
Hey there, could you also post a simple curl GET request to the collection endpoint? Or, if you're searching by alias, also post the response of that request as well
c
You mean to show all the collections? @Fanis Tharropoulos
f
The alias you're querying by and the collection it points to
c
@Fanis Tharropoulos I don't use an alias the collection name is AdVideo_1730884060087. But I have put this as my indexName
~`{` "created_at": 1730884060, "default_sorting_field": "publishedAt", "enable_nested_fields":
*true*,
"fields": [ { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": ".*", "optional":
*true*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "auto" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "viewCount", "optional":
*false*,
"sort":
*true*,
"stem":
*false*,
"store":
*true*,
"type": "int32" }, { "facet":
*true*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "publishedAt", "optional":
*false*,
"sort":
*true*,
"stem":
*false*,
"store":
*true*,
"type": "int64" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "updatedAt", "optional":
*false*,
"sort":
*true*,
"stem":
*false*,
"store":
*true*,
"type": "int64" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "duration", "optional":
*false*,
"sort":
*true*,
"stem":
*false*,
"store":
*true*,
"type": "int32" }, { "facet":
*true*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "language", "optional":
*false*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*true*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "status", "optional":
*false*,
"sort":
*true*,
"stem":
*false*,
"store":
*true*,
"type": "int32" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "title", "optional":
*false*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "description", "optional":
*false*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "transcript", "optional":
*false*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "channelId", "optional":
*true*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "channelName", "optional":
*true*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "channel_thumbnail", "optional":
*true*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "ctaUrl", "optional":
*true*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" }, { "facet":
*false*,
"index":
*true*,
"infix":
*false*,
"locale": "", "name": "thumbnail", "optional":
*true*,
"sort":
*false*,
"stem":
*false*,
"store":
*true*,
"type": "string" } ], "name": "AdVideo_1730884060087", "num_documents": 457802, "symbols_to_index": [], "token_separators": [] } This is the full collection~
f
From your curl request I noticed you pointed to a collection of "AdVideo", does that exist?
c
It does but its not the same actually. This might be the issue. Let me check
@Fanis Tharropoulos I think this was the issue. I changed the indexName to a new collection but did not update the sorting collection to the new index. Thank you!
🙌 1
f
Happy to be of help!