Index the value field of index nodes.

This commit is contained in:
Roberto Rosario
2015-07-29 13:32:42 -04:00
parent 2e9a809a4e
commit 8072db07dd
2 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('document_indexing', '0007_auto_20150729_0152'),
]
operations = [
migrations.AlterField(
model_name='indexinstancenode',
name='value',
field=models.CharField(db_index=True, max_length=128, verbose_name='Value', blank=True),
preserve_default=True,
),
]

View File

@@ -125,7 +125,7 @@ class IndexInstanceNode(MPTTModel):
verbose_name=_('Index template node')
)
value = models.CharField(
blank=True, max_length=128, verbose_name=_('Value')
blank=True, db_index=True, max_length=128, verbose_name=_('Value')
)
documents = models.ManyToManyField(
Document, related_name='node_instances', verbose_name=_('Documents')