Project: usergrid
Issue USERGRID-655: More than one connection does not get created when running batch index on connection edges
When running the following code in indexEntity final Observable batches = observable.buffer( indexFig.getIndexBatchSize() ) //map into batches based on our buffer size .flatMap( buffer -> Observable.from( buffer ) //collect results into a single batch .collect( () -> ei.createBatch(), ( batch, indexEdge ) -> { logger.debug( "adding edge {} to batch for entity {}", indexEdge, entity ); batch.index( indexEdge, entity ); } ) //return the future from the batch execution .flatMap( batch -> batch.execute() ) ); When run with more than one SearchEdge only one SearchEdge is indexed into elasticsearch. Despite both search edges having the same document id. The batch executes but only one connection gets indexed in elasticsearch.
Story points: 3