sphinx 以mysql為資料來源 建索引失敗

來源:互聯網
上載者:User
這是sphinx.conf 的內容
source src1
{

    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

}

這是我建立索引的命令 /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
{

    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

}

這是我建立索引的命令 /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 {

source src1;…

}

  • 相關文章

    聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.