나는 2 개의 인덱스를 연결하여 2 개의 테이블을 검색하도록 스핑크스를 시도하고있다.스핑크스와 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
}
여기에 인덱스 자신은 다음과 같습니다 : 여기이 인덱스의 소스는 내가 sphinxapi.php을 사용하고
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
}
, 나는
->query('some keywords', 'activityMentionIndex userMentionIndex');
의 필드 인덱스를 수행 할 때 반환 된 배열은 두 번째 인덱스 만 인식했다는 것을 보여줍니다 (이 경우 userMentionIndex를 전환하면 activityMentionIndex를 인식합니다)
아무도 내가 틀린 일을하고 있거나 2 가지 다른 테이블의 2 가지 인덱스를 쿼리 할 수 있다고 말할 수 있습니까?