diff options
-rw-r--r-- | gnowsys-ndf/gnowsys_ndf/ndf/models.py | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/models.py b/gnowsys-ndf/gnowsys_ndf/ndf/models.py index 37b8894..bb69cda 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/models.py +++ b/gnowsys-ndf/gnowsys_ndf/ndf/models.py @@ -235,7 +235,16 @@ class Node(DjangoDocument): # ready. default_values = {'created_at': datetime.datetime.utcnow, 'status': u'DRAFT'} use_dot_notation = True - +""" + indexes=[ + { + 'fields':['_type','name'], + }, + { + 'fields':['member_of','group_set'], + }, + ] +""" ########## Setter(@x.setter) & Getter(@property) ########## @property @@ -1560,7 +1569,16 @@ class Triple(DjangoDocument): 'lang': basestring, # Put validation for standard language codes 'status': STATUS_CHOICES_TU } - + """ + indexes=[ + { + 'fields':['_type','name'], + }, + { + 'fields':['_type','subject'], + } + ] +""" required_fields = ['name', 'subject'] use_dot_notation = True use_autorefs = True |