Commit af03e528 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Allow deeply nested search quantities.

parent ca5dbe12
......@@ -153,8 +153,9 @@ class ElasticDocument(SectionAnnotation):
# create an field for each sub section
for sub_section in section.all_sub_sections.values():
sub_sectoin_prefix = '%s.%s' % (prefix, sub_section.name) if prefix else sub_section.name
inner_document = ElasticDocument.create_document(
sub_section.sub_section, inner_doc=True, prefix=sub_section.name)
sub_section.sub_section, inner_doc=True, prefix=sub_sectoin_prefix)
if inner_document is not None:
# sub sections with no elastic quantities get a None document
attrs[sub_section.name] = Object(inner_document)
......
......@@ -125,7 +125,6 @@ class Search(Elastic):
super().init_annotation(definition)
def register(self, prefix, field):
# TODO support more deeply nested quantities
domain_or_all = self.definition.m_parent.m_get_annotations('domain', '__all__')
prefix_and_dot = prefix + '.' if prefix is not None else ''
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment