From 456d6c09b0d1c0e1795eae62ca89426990c39e26 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Wed, 2 Oct 2024 11:58:45 -0400 Subject: [PATCH] Remove sample_index boilerplate --- .../search_indexes/sample_index.py | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 arches_references/search_indexes/sample_index.py diff --git a/arches_references/search_indexes/sample_index.py b/arches_references/search_indexes/sample_index.py deleted file mode 100644 index cd9c1e8..0000000 --- a/arches_references/search_indexes/sample_index.py +++ /dev/null @@ -1,20 +0,0 @@ -from arches.app.search.base_index import BaseIndex - - -class SampleIndex(BaseIndex): - def prepare_index(self): - self.index_metadata = { - "mappings": { - "properties": { - "tile_count": {"type": "keyword"}, - "graph_id": {"type": "keyword"}, - } - } - } - super(SampleIndex, self).prepare_index() - - def get_documents_to_index(self, resourceinstance, tiles): - return ( - {"tile_count": len(tiles), "graph_id": resourceinstance.graph_id}, - str(resourceinstance.resourceinstanceid), - )