Hi everyone,

I'm trying to implement a nested JSONB index on a nested field in the json 
file. I searched through internet and came at the conclusion that I had to 
create it manually.

so that's where I am. 

op.create_index('ix_law_search_vector', 'law', ['search_vector'], 
unique=False, postgresql_using='gin')


first of all, I don't understand the 3rd argument. what does this 
represent? the name of the index?

this is what should be. but my problem is that my desire index is very deep 
in the JSONB.


that's what I've to target : 
Image.image_metadata['afield']['anotherfield']['fieldindex']


I want to create an index on fieldindex.


but if I do :

op.create_index('uri', ['search_vector'], unique=False, 
postgresql_using='gin')


as there is a lot of field 'uri' in the json, will it index all this fields 
in 1 ?


(I'm new to sqlalchemy, I usually use the django orm, so sorry in advance).


Thanks for answers

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to