I have product_reviews TABLE with product_review jsonb column.
jsonb column : [{"comment": [{"condition": "Good", "Entered": "true"}], "productid": 321}]
CREATE INDEX idx_product_reviews_product_review ON product_reviews USING gin (CAST (product_review ->> 'productid') AS bigint ) ;
So when i try to create gin index on this jsonb column, i get error.
ERROR: data type bigint has no default operator class for access method "gin"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
I want to index productid as bigint type values, so i can get jsonb "comment" values comparing this productid.
<or>is not defined. When these operations are defined, then you can use a BTREE index. For almost all types the GIN, GIST index is supported or BTREE index is supported - not both cases.