0

こんにちは、私のCentOS VPSにSphinxをインストールしました..しかし、何らかの理由で検索するたびに結果が得られません..検索にsshを使用しています..コマンドは次のとおりです

 search --index sphinx_index_cc_post -a Introducing The New Solar Train Tunnel

これはコマンドの出力です

Sphinx 2.0.5-release (r3308)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/etc/sphinx.conf'...
index 'sphinx_index_cc_post': query 'Introducing The New Solar Train Tunnel ': returned 0 matches of 0 total in 0.000 sec

words:
1. 'introducing': 0 documents, 0 hits
2. 'the': 0 documents, 0 hits
3. 'new': 0 documents, 0 hits
4. 'solar': 0 documents, 0 hits
5. 'train': 0 documents, 0 hits
6. 'tunnel': 0 documents, 0 hits

これは設定ファイルの私のインデックスです

source sphinx_index_cc_post
{

    type                                    = mysql
    sql_host                                = localhost
    sql_user                                = user
    sql_pass                                = password
    sql_db                                  = database
    sql_port                                = 3306

    sql_query_range                 = SELECT MIN(postid),MAX(postid) FROM cc_post
    sql_range_step                  = 1000

    sql_query                               = SELECT postedby, category, totalvotes, trendvalue, featured, isactive, postingdate \
                                            FROM cc_post \
                                            WHERE  postid BETWEEN $start AND $end
}

index sphinx_index_cc_post
{
    source                  = sphinx_index_cc_post
    path                    = /usr/local/sphinx/data/sphinx_index_cc_post
    charset_type            = utf-8
    min_word_len    = 2
}

インデックスは正常に機能しているようです。インデックスを回転すると、ドキュメントを正常に取得できます。これが私のインデクサーの結果です

[root@server1 data]# indexer --rotate sphinx_index_cc_post
Sphinx 2.0.5-release (r3308)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/usr/local/etc/sphinx.conf'...
indexing index 'sphinx_index_cc_post'...
WARNING: Attribute count is 0: switching to none docinfo
WARNING: source sphinx_index_cc_post: skipped 1 document(s) with zero/NULL ids
collected 2551 docs, 0.1 MB
sorted 0.0 Mhits, 100.0% done
total 2551 docs, 61900 bytes
total 0.041 sec, 1474933 bytes/sec, 60784.40 docs/sec
total 2 reads, 0.000 sec, 1.3 kb/call avg, 0.0 msec/call avg
total 6 writes, 0.000 sec, 1.0 kb/call avg, 0.0 msec/call avg
rotating indices: succesfully sent SIGHUP to searchd (pid=17888).

私も属性を削除しようとしましたが、うまくいきません!! クエリの問題の構成の問題のいずれかだと思います

4

1 に答える 1

1

クエリは次のとおりです。

SELECT postedby, category, totalvotes, trendvalue, featured, isactive, postingdate \
                                            FROM cc_post

列名から、これらの列のいずれにも全文が含まれていないと思います。テキストを含む列がありませんか?

于 2013-07-07T08:50:43.920 に答える