views:

194

answers:

2

The Sphinx config file hints to it supporting multiple sources for one index, how do I actually specify it?

Here's the snippet from the config file:

# document source(s) to index
# multi-value, mandatory
# document IDs must be globally unique across all sources
source                  = src1

I've tried setting it in the following formats:

source = src1, src2
source = [src1, src2]

and I've also tried using the source variable twice, eg:

source = src1
source = src2

I suspect that I'm just being a dunce, as I'm not sure of the syntax to use in the config file. Any ideas?

Using the second code snippet I get the following error:

ERROR: index 'iwa': fulltext fields count mismatch (me=iwa_publications, in=iwa_events, myfields=3, infields=8).

The two sources are iwa_events and iwa_publications. Both have unique id columns, and both sources work when indexed individually.

+1  A: 
Jan Hančič
I was hoping to store only one index that contains multiple sources - which appears to be supported according to the config file. Or am I sorely mistaken? :)
Throlkim
Sorry, see my edit.
Jan Hančič
Done, sorry if my original explanation wasn't clear enough. :)
Throlkim
Ah, I think I've figured out why it won't work:"source schemas must be the same in order to be stored within the same index."Whoops, totally missed that line!
Throlkim
A: 

Problem found: I misread the point of having multiple sources. It would appear that multiple sources can indeed be used in one index, but only if they're identical in terms of schema, as according to this line in the docs:

"source schemas must be the same in order to be stored within the same index."

Thanks very much for the help, Jan. It was my bad for the misunderstanding. :D

Throlkim