diff --git a/sapl/base/search_indexes.py b/sapl/base/search_indexes.py index b0479d401..9bdf6aa7a 100644 --- a/sapl/base/search_indexes.py +++ b/sapl/base/search_indexes.py @@ -8,7 +8,7 @@ from django.db.models.functions import Concat from django.template import loader from haystack import connections from haystack.constants import Indexable -from haystack.fields import CharField, DateTimeField +from haystack.fields import CharField, DateTimeField, IntegerField from haystack.utils import get_model_ct_tuple from sapl.compilacao.models import (STATUS_TA_IMMUTABLE_PUBLIC, @@ -145,6 +145,8 @@ class DocumentoAcessorioIndex(CelerySearchIndex, Indexable): class NormaJuridicaIndex(DocumentoAcessorioIndex): model = NormaJuridica data = DateTimeField(model_attr='data', null=True) + tipo = CharField(model_attr='tipo__sigla') + ano = IntegerField(model_attr='ano') text = TextExtractField( document=True, use_template=True, model_attr=( @@ -159,6 +161,8 @@ class NormaJuridicaIndex(DocumentoAcessorioIndex): class MateriaLegislativaIndex(DocumentoAcessorioIndex): model = MateriaLegislativa + tipo = CharField(model_attr='tipo__sigla') + ano = IntegerField(model_attr='ano') data = DateTimeField(model_attr='data_apresentacao') text = TextExtractField( document=True, use_template=True, diff --git a/solr/sapl_configset/conf/managed-schema b/solr/sapl_configset/conf/managed-schema index 771c83a51..f94f2788b 100644 --- a/solr/sapl_configset/conf/managed-schema +++ b/solr/sapl_configset/conf/managed-schema @@ -120,6 +120,8 @@ + + diff --git a/solr/sapl_configset/conf/saplconfigset.zip b/solr/sapl_configset/conf/saplconfigset.zip index bca803662..495420569 100644 Binary files a/solr/sapl_configset/conf/saplconfigset.zip and b/solr/sapl_configset/conf/saplconfigset.zip differ