8f7722a77e21acd9d1c1f1e93c55674203f6c66e
[wolnelektury.git] / apps / search / index.py
1
2 from django.conf import settings
3 from lucene import SimpleFSDirectory, IndexWriter
4 import os
5
6
7 class BookSearch(object):
8     def __init__(self):
9         if not os.exists(settings.SEARCH_INDEX):
10             os.mkdir(settings.SEARCH_INDEX)
11         self.store = IndexWriter(store, )
12