lib/indexer.js
function merge(torrents)
{
	// NOTE: here, on the merge logic, we can set properties that should always be set
	// Or just rip out the model logic from LinvoDB into a separate module and use it
	return torrents.reduce(function(a, b) { 
		return _.merge(a, b, function(x, y) {
			// this is for the files array, and we want more complicated behaviour 
			if (_.isArray(a) && _.isArray(b)) return b;
		})
	})
}
function merge(torrents)
{
	// NOTE: here, on the merge logic, we can set properties that should always be set
	// Or just rip out the model logic from LinvoDB into a separate module and use it
	return torrents.reduce(function(a, b) { 
		return _.merge(a, b, function(x, y) {
			// this is for the files array, and we want more complicated behaviour 
			if (_.isArray(a) && _.isArray(b)) return b;
		})
	})
}
function merge ( torrents ) { // NOTE: here, on the merge logic, we can set properties that should always be set // Or just rip out the model logic from LinvoDB into a separate module and use it return torrents . reduce ( function ( a , b ) { return _ . merge ( a , b , function ( x , y ) { // this is for the files array, and we want more complicated behaviour  if ( _ . isArray ( a ) && _ . isArray ( b ) ) return b ; } ) } ) }
Conflict resolution logic is here
Conflict resolution logic is here