Project

General

Profile

« Previous | Next » 

Revision 61150

Ensure an index on id field

View differences:

RecentResultsQueue.java
5 5
import java.util.List;
6 6

  
7 7
import com.mongodb.*;
8
import com.mongodb.client.model.IndexOptions;
8 9
import eu.dnetlib.miscutils.datetime.DateUtils;
9 10
import org.apache.commons.logging.Log;
10 11
import org.apache.commons.logging.LogFactory;
......
26 27
			log.info(String.format("creating collection %s", collection));
27 28
			db.createCollection(collection, new BasicDBObject());
28 29
		}
30
		db.getCollection(collection).createIndex(new BasicDBObject("id", 1), new BasicDBObject("background", true));
29 31
	}
30 32

  
31 33
	@Override

Also available in: Unified diff