16 lines
415 B
Python
16 lines
415 B
Python
from __future__ import absolute_import
|
|
|
|
from documents.models import Document
|
|
|
|
from .api import index_document
|
|
from .models import Index, IndexInstanceNode
|
|
|
|
|
|
def do_rebuild_all_indexes():
|
|
for instance_node in IndexInstanceNode.objects.all():
|
|
instance_node.delete()
|
|
|
|
for document in Document.objects.all():
|
|
# TODO: Launch all concurrently as background tasks
|
|
index_document(document)
|