From a2586dece1953e7c395b533bf52b54b5e7bb3a3c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 21 Jun 2014 15:33:22 -0400 Subject: [PATCH] doc: adjust JSONB GIN index description Backpatch through 9.4 --- doc/src/sgml/json.sgml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/json.sgml b/doc/src/sgml/json.sgml index 66426189ca5..d55a08fb18a 100644 --- a/doc/src/sgml/json.sgml +++ b/doc/src/sgml/json.sgml @@ -460,11 +460,16 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu and a jsonb_path_ops GIN index is that the former creates independent index items for each key and value in the data, while the latter creates index items only for each value in the - data.For this purpose, the term value - includes array elements, though JSON terminology sometimes considers - array elements distinct from values within objects. - But in jsonb_path_ops, each index item is a hash - of both the value and the key(s) leading to it; for example to index + data. + + + For this purpose, the term value includes array elements, + though JSON terminology sometimes considers array elements distinct + from values within objects. + + + Basically, each jsonb_path_ops index item is + a hash of the value and the key(s) leading to it; for example to index {"foo": {"bar": "baz"}}, a single index item would be created incorporating all three of foo, bar, and baz into the hash value. Thus a containment query