Rewrite the document indexer to allow single index rebuilds,

less locks and improve performance.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-05-28 15:22:13 -04:00
parent 3e3e247997
commit 88151df2bc
14 changed files with 306 additions and 208 deletions
@@ -116,7 +116,7 @@ class IndexTestCase(BaseTestCase):
), ['', '0003']
)
# Document deleted from, index structure should update
# Document deleted, index structure should update
self.document.delete()
self.assertEqual(
list(
@@ -162,7 +162,7 @@ class IndexTestCase(BaseTestCase):
self.assertEqual(list(IndexInstanceNode.objects.all()), [])
# Rebuild all indexes
IndexInstanceNode.objects.rebuild_all_indexes()
Index.objects.rebuild()
# Check that document is in instance node
instance_node = IndexInstanceNode.objects.get(value='0001')