pull/577/head
Mr Chen 12 months ago
parent 7c96bbe72f
commit c90d752ae7
  1. 6
      plugins/sphinx/class/sphinx_make.py
  2. 5
      plugins/sphinx/install.sh

@ -124,7 +124,10 @@ def makeSphinxDbSourceQuerySql(db, table):
pkey_name = getTablePk(db, table)
field_str = getTableFieldStr(db,table)
# print(field_str)
sql = "SELECT "+field_str+" FROM "+table+ " where "+pkey_name+" >= $start AND "+pkey_name+" <= $end"
if pkey_name == 'id':
sql = "SELECT " + field_str + " FROM " + table + " where id >= $start AND id <= $end"
else:
sql = "SELECT "+pkey_name+' as id,' + field_str + " FROM " + table + " where id >= $start AND id <= $end"
return sql
def makeSphinxDbSource(db, table):
@ -182,7 +185,6 @@ index {$DB_NAME}_{$TABLE_NAME}
def makeSqlToSphinxAll():
filter_db = ['information_schema','performance_schema','sys','mysql']
pdb = pMysqlDb()

@ -11,9 +11,10 @@ sysName=`uname`
install_tmp=${rootPath}/tmp/mw_install.pl
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/sphinx/index.py rebuild
# /www/server/sphinx/bin/bin/indexer -c /www/server/sphinx/sphinx.conf --all --rotate
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/sphinx/index.py db_to_sphinx
# cd /www/server/mdserver-web && source bin/activate && python3 plugins/sphinx/index.py db_to_sphinx
# /www/server/sphinx/bin/bin/indexer -c /www/server/sphinx/sphinx.conf --all --rotate
# /Users/midoks/Desktop/mwdev/server/sphinx/bin/bin/indexer /Users/midoks/Desktop/mwdev/server/sphinx/sphinx.conf --all --rotate
bash ${rootPath}/scripts/getos.sh
OSNAME=`cat ${rootPath}/data/osname.pl`

Loading…
Cancel
Save