fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove legacy search.
[wolnelektury.git]
/
src
/
catalogue
/
management
/
commands
/
importbooks.py
diff --git
a/src/catalogue/management/commands/importbooks.py
b/src/catalogue/management/commands/importbooks.py
index
e9b3364
..
9322eea
100644
(file)
--- a/
src/catalogue/management/commands/importbooks.py
+++ b/
src/catalogue/management/commands/importbooks.py
@@
-12,7
+12,6
@@
from librarian.picture import ImageStore
from catalogue.models import Book
from picture.models import Picture
from catalogue.models import Book
from picture.models import Picture
-from search.index import Index
class Command(BaseCommand):
class Command(BaseCommand):
@@
-28,10
+27,6
@@
class Command(BaseCommand):
parser.add_argument(
'-D', '--dont-build', dest='dont_build', metavar="FORMAT,...",
help="Skip building specified formats")
parser.add_argument(
'-D', '--dont-build', dest='dont_build', metavar="FORMAT,...",
help="Skip building specified formats")
- parser.add_argument(
- '-S', '--no-search-index', action='store_false',
- dest='search_index', default=True,
- help='Skip indexing imported works for search')
parser.add_argument(
'-F', '--not-findable', action='store_false',
dest='findable', default=True,
parser.add_argument(
'-F', '--not-findable', action='store_false',
dest='findable', default=True,
@@
-50,7
+45,6
@@
class Command(BaseCommand):
file_base, ext = os.path.splitext(file_path)
book = Book.from_xml_file(file_path, overwrite=options.get('force'),
dont_build=dont_build,
file_base, ext = os.path.splitext(file_path)
book = Book.from_xml_file(file_path, overwrite=options.get('force'),
dont_build=dont_build,
- search_index_tags=False,
findable=options.get('findable'),
remote_gallery_url='file://' + os.path.dirname(os.path.abspath(file_base)) + '/img/'
)
findable=options.get('findable'),
remote_gallery_url='file://' + os.path.dirname(os.path.abspath(file_base)) + '/img/'
)
@@
-84,15
+78,6
@@
class Command(BaseCommand):
verbose = options.get('verbose')
import_picture = options.get('import_picture')
verbose = options.get('verbose')
import_picture = options.get('import_picture')
- if options.get('search_index') and not settings.NO_SEARCH_INDEX:
- index = Index()
- try:
- index.index_tags()
- index.index.commit()
- except Exception as e:
- index.index.rollback()
- raise e
-
files_imported = 0
files_skipped = 0
files_imported = 0
files_skipped = 0