2 つのインデックスをリンクして、スフィンクスに 2 つのテーブルを検索させようとしています。これらのインデックスのソースは次のとおりです。
source gSrc
{ #General Source
type = mysql
sql_host = localhost
sql_user = (blahblahblah)
sql_pass = (blahblahblah)
sql_db = (blahblahblah)
sql_port = 3306 # optional, default is 3306
sql_ranged_throttle = 0
}
source mentionActivitySrc : gSrc
{
sql_query = \
SELECT id, author, thesis, body, created, updated \
FROM activity
sql_attr_uint = id
sql_attr_timestamp = updated
sql_query_info = SELECT * FROM activity WHERE id=$id
}
source mentionUserSrc : gSrc
{
sql_query = \
SELECT id, first, last, username, email, updated \
FROM user
sql_attr_uint = id
sql_attr_timestamp = updated
sql_query_info = SELECT * FROM user WHERE id=$id
}
インデックス自体は次のとおりです。
index gIndex
{ #General Index
docinfo = extern
mlock = 0
morphology = none
min_word_len = 1
charset_type = sbcs
html_strip = 0
}
index activityMentionIndex : gIndex
{
source = mentionActivitySrc
path = /var/lib/sphinxsearch/data/activityMentionIndex
}
index userMentionIndex : gIndex
{
source = mentionUserSrc
path = /var/lib/sphinxsearch/data/userMentionIndex
}
私はsphinxapi.phpを使用しています。
->query('some keywords', 'activityMentionIndex userMentionIndex');
返された配列のフィールド インデックスは、2 番目のインデックスのみを認識したことを示しています (この場合、userMentionIndex、それらを切り替えると、activityMentionIndex が認識されます)。
誰が私が間違っているのか、または2つの異なるテーブルの2つのインデックスを照会できるかどうか教えてもらえますか?