Elasticsearch - Basics and Architecture
You want to search documents where the tags field contains either "red" or "blue". Which query is correct?
You want to search documents where the tags field contains either "red" or "blue". Which query is correct?
terms query accepts an array of values and matches any document containing any of those values.term does not accept arrays, match treats text differently, and bool must requires all terms, not either/or.terms query with array of values -> Option Bterms for multiple exact values [OK]terms query matches any value in array [OK]term with arraysbool must for OR logicmatch for exact tags15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions