diff --git a/plugins/sphinx/class/sphinx_make.py b/plugins/sphinx/class/sphinx_make.py index 98e3e2a57..147151edc 100644 --- a/plugins/sphinx/class/sphinx_make.py +++ b/plugins/sphinx/class/sphinx_make.py @@ -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() diff --git a/plugins/sphinx/install.sh b/plugins/sphinx/install.sh index 831b7e0c6..c9db0833a 100755 --- a/plugins/sphinx/install.sh +++ b/plugins/sphinx/install.sh @@ -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`