Answer the question
In order to leave comments, you need to log in
How to search in Sphinx across different tables with different fields?
There are different tables with different sets of fields. Created sources (source) and indexes (index) for all. There are no relationships between tables. I am using PHP API. Does sphinx allow searching these tables at the same time? Can id's in tables intersect (each table has an autoincrement primary key id from 1 and above)? Or is the only option to do multiple queries (per query for each index)?
Answer the question
In order to leave comments, you need to log in
I'm making a special search table with example fields:
id | table_name | external_id | search_data...
Yes, you can. It used to be like it is now - I don't know.
Attention, shitcode!
In the config, in each source -
sql_attr_uint = tab
1 as tab
I didn't know much about Sphinx. I can offer a simple crutch using union select, then the source will be one for two tables or make a representation from the same opera, which is also bony.
I also had the same question, here's what helped
Sphinx search on different tables
If the topic is still relevant
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question