sphinx 以mysql为数据源 建索引失败

WBOY
リリース: 2016-06-06 20:18:37
オリジナル
1402 人が閲覧しました

这是sphinx.conf 的内容
source src1
{

<code>    type                    = mysql

    sql_host                = localhost
    sql_user                = root
    sql_pass                = 1goodlusslulU
    sql_db                  = fangxinjia_sku
    sql_port                = 3306  # optional, default is 3306

    sql_query_pre        = SET NAMES utf8
   # sql_query_pre        = SET SESSION query_cache_type=OFF

    sql_query               = \
            SELECT product_attribute_id,product_name \
            FROM product_attribute

    sql_attr_uint           = product_attribute_id
    sql_attr_string         = product_name</code>
ログイン後にコピー
ログイン後にコピー

}

这是我建立索引的命令 /usr/local/sphinx/bin/indexer --config /usr/local/sphinx/etc/sphinx.conf --all
执行完 一直是这个结果,

Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/sphinx/etc/sphinx.conf'...
skipping non-plain index 'product_attribute'...
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

求教有什么问题,感谢

mysql库中有文件,索引执行命运也没有报错,但就是没数据

回复内容:

这是sphinx.conf 的内容
source src1
{

<code>    type                    = mysql

    sql_host                = localhost
    sql_user                = root
    sql_pass                = 1goodlusslulU
    sql_db                  = fangxinjia_sku
    sql_port                = 3306  # optional, default is 3306

    sql_query_pre        = SET NAMES utf8
   # sql_query_pre        = SET SESSION query_cache_type=OFF

    sql_query               = \
            SELECT product_attribute_id,product_name \
            FROM product_attribute

    sql_attr_uint           = product_attribute_id
    sql_attr_string         = product_name</code>
ログイン後にコピー
ログイン後にコピー

}

这是我建立索引的命令 /usr/local/sphinx/bin/indexer --config /usr/local/sphinx/etc/sphinx.conf --all
执行完 一直是这个结果,

Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/sphinx/etc/sphinx.conf'...
skipping non-plain index 'product_attribute'...
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

求教有什么问题,感谢

mysql库中有文件,索引执行命运也没有报错,但就是没数据

没有配置index

index src1 {

<code>source src1;
…</code>
ログイン後にコピー

}

関連ラベル:
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
最新の問題
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!