fnp
/
wolnelektury.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
a8a4cf9dda764b96f5f701e93c2adf5ebe18e798
[wolnelektury.git]
/
apps
/
search
/
management
/
commands
/
optimizeindex.py
1
2
from django.core.management.base import BaseCommand
3
from search import Index
4
5
class Command(BaseCommand):
6
help = 'Optimize Lucene search index'
7
args = ''
8
9
def handle(self, *args, **opts):
10
index = Index()
11
index.open()
12
try:
13
index.optimize()
14
finally:
15
index.close()