Add indexes and sphinx.conf (conf and query stolen from https://github.com/Yuego/django-fias)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import optparse
|
||||
|
||||
from aore.aoutils.aoupdater import AoUpdater
|
||||
from aore.miscutils.sphinx import produce_sphinx_config
|
||||
|
||||
|
||||
def update_base(xml_source, updates_count):
|
||||
@@ -24,6 +25,8 @@ def main():
|
||||
help="Count of updates to process, only for '--database update' option")
|
||||
p.add_option('--source', '-s', default="http",
|
||||
help="Create/update DB from source. Value: \"http\" or absolute path to folder")
|
||||
p.add_option('--sphinx-configure', '-c', action="store", type="string",
|
||||
help="Get Sphinx config. Value: /path/to/sphinx.conf")
|
||||
options, arguments = p.parse_args()
|
||||
|
||||
if options.database:
|
||||
@@ -34,6 +37,9 @@ def main():
|
||||
if options.database == "update":
|
||||
update_base(options.source, int(options.update_count))
|
||||
|
||||
if options.sphinx_configure:
|
||||
produce_sphinx_config(options.sphinx_configure)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user