Reputation: 187
Sphinx manual says that index merging should keep old keywords along with new ones:
Note, however, that the "old" keywords will not be automatically removed in such cases. For example, if there's a keyword "old" associated with document 123 in DSTINDEX, and a keyword "new" associated with it in SRCINDEX, document 123 will be found by both keywords after the merge.
I cannot reproduce this.
main
indexer --rotate delta
indexer --rotate --merge main delta
searchd
to reload the indexSELECT id FROM main WHERE match('two')
, but match('one')
does not find anything.Sources for both indexes are defined essentially as:
sql_query = SELECT id, text FROM tbl
I have also tried to specify keywords via sql_joined_field
and merge does not keep old keywords from it too.
Does this mean the manual is wrong? Is it safe to assume that if SRCINDEX has info for an ID (attributes and text keywords), merge process will discard everything DSTINDEX had for that ID and replace it with new info?
Upvotes: 1
Views: 1986
Reputation: 1719
I asked Andrey Aksenoff (creator of Sphinx) about this. He said that now they clean duplicate id while merging if index docinfo is extern.
So yes, it is a bug in documentation.
Upvotes: 2
Reputation: 1719
If Sphinx found duplicate IDs when they are eliminated from search results, so you Sphinx return only unique IDs. What's why you didn't see them in search results.
Upvotes: 0