I am using Manticore search engine(forked from Sphinx). I am setting up a pair of indexes implementing main+delta approach. Delta index is updated using tsvpipe.
source postings_source_delta
{
type = tsvpipe
tsvpipe_command = bash /opt/get-delta.sh 2>/var/log/manticore/delta_index_error.log
tsvpipe_field = content
tsvpipe_attr_string = mongoId
}
get-delta.sh script yields tsv with latest items recently added to database. The problem is that if there are no items then tsv becomes empty and in this case indexer is failing with error.
ERROR: index 'postings_index_delta': source 'postings_source_delta': read error 'Inappropriate ioctl for device'.
This makes indexing with tsv/csv unreliable. Is there a way to solve this problem?
In general (for all sources) Manticore doesn't enable creation of empty plain indexes, but there's a trick - you can do it using a mysql source:
will give you:
So what you could do is check if your TSV command returns anything and if it doesn't - use this trick.
It's recommended to use an RT index instead.
UPDATE
xmlpipe2 can also build an empty plain index, e.g.
will give: