#community-help

Resolving Error Code 404 on Facet Field Search

TLDR gab asked why there's a 404 error when searching facet fields with no documents. Kishore Nallan clarified it's due to attempting to facet on a non-'facet: true' field.

Powered by Struct AI
3
24mo
Solved
Join the chat
Nov 04, 2021 (24 months ago)
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
08:18 AM
Hi,
Why searching on a facet field that exist on the schema but where no documents are found give a 404 error ? Shouldn't it be just an empty results?
I got error like this "Could not find a facet field named a_field_name in the schema."
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
03:44 PM
You should get that error only when you try to facet on a field that exists in the schema but is not marked as facet: true
Nov 05, 2021 (24 months ago)
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
12:28 PM
Thanks for clarification about this error, I will double check that