6 ms·
We have a collection of semi-structured data that we've been storing with the JSON features in 9.3. Very cool to build a full text search index based on things
by jeffasinger 13y ago
We have a collection of semi-structured data that we've been storing with the JSON features in 9.3.
Very cool to build a full text search index based on things inside of JSON fields with about 10 minutes of time.
- gregwebs 13y agocan you do a normal index on JSON though? I guess you can with the function based indexes. 9.3 actually makes JSON meaningful in Postgres since you can actually query it now. But there are no write operations, so MongoDB is still a ton nicer here with its atomic modifiers like $push.
- masklinn 13y ago> can you do a normal index on JSON though? Yes, using the ->> operator you should be able to create an index on a JSON field, e.g. CREATE INDEX ON table ((field->>'thing')) (an index on a JSON column makes no more sense than on e.g. an hstore column)