Add indexes and sphinx.conf (conf and query stolen from https://github.com/Yuego/django-fias)

This commit is contained in:
Jack Stdin
2016-01-14 01:36:34 +03:00
parent 67f6943dce
commit 759efc43ee
14 changed files with 216 additions and 57 deletions

View File

@@ -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()