Using multiple indexes in SphinxQl and searching across fields from multiple indexes

StackOverflow https://stackoverflow.com/questions/12970368

  •  09-07-2021
  •  | 
  •  

문제

So guys I have multiple indexes in Sphinx

eg 3 Indexes
index1 Fields: field1_1,field1_2,field1_3
index2 Fields: field2_1,field2_2,field2_3
index3 Fields: field3_1,field3_2,field3_3

I want to search across these three indexes and my search string should be matched across all these fields.

I tried

$query="select * from index1,index2,index3 Match(@(field1_1,field1_2,field1_3,field2_1,field2_2,field2_3,field3_1,field3_2,field3_3) $searchstring)";

But this is throwing some error.How do I achieve something like this. Thanks

도움이 되었습니까?

해결책

But this is throwing some error.

You should actully read the error message, rather than just dismissing it as 'some error'. Error messages are there to help you figure out what is wrong.

But looking at your query, its not valid SphinxQL. Look closer at the documentation, and the example queries... http://sphinxsearch.com/docs/current.html#sphinxql-select

다른 팁

Sphinx merges indexes schema leaving only common fields across all used indexes. Please make sure you're searching though common fields.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top