Metadata search is failing due to a boolean field in the mapping of the metadata fields
After having ingested the indexed metadata on the production cluster, there is an issue when a search is done :
This is the request executed on ES:
{"query":{"bool":{"must":[{"nested":{"path":"intrinsic_metadata","query":{"multi_match":{"query":"Barkovsky","type":"cross_fields","operator":"and","fields":["intrinsic_metadata.*"]}}}}],"must_not":[{"term":{"blocklisted":true}}]}},"sort":[{"_score":"desc"},{"sha1":"asc"}]}
This is the error:
Error 400.
{"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: Can't parse boolean value [Barkovsky], expected [true] or [false]","index_uuid":"hZfuv0lVRImjOjO_rYgDzg","index":"origin-production"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"origin-production","node":"aWtTAVJtTf2Pw8xLPGQt3w","reason":{"type":"query_shard_exception","reason":"failed to create query: Can't parse boolean value [Barkovsky], expected [true] or [false]","index_uuid":"hZfuv0lVRImjOjO_rYgDzg","index":"origin-production","caused_by":{"type":"illegal_argument_exception","reason":"Can't parse boolean value [Barkovsky], expected [true] or [false]"}}}]},"status":400}
The same query is working in staging so a mapping issue is probably at the origin of the problem
Migrated from T3373 (view on Phabricator)