Project

General

Profile

« Previous | Next » 

Revision 45988

fixed drop oai set

View differences:

modules/dnet-data-provision-services/trunk/src/main/java/eu/dnetlib/oai/mongo/MongoPublisherStoreDAO.java
141 141
		if (storeInfo == null) {
142 142
			return false;
143 143
		} else {
144
			db.getCollection(storeId).deleteMany(Filters.eq(OAIConfigurationReader.SET_FIELD, set));
145
			this.mongoSetCollection.dropSet(dbName, set);
144
            db.getCollection(storeId).deleteMany(Filters.eq(OAIConfigurationReader.SET_FIELD, this.mongoSetCollection.normalizeSetSpec(set)));
145
            this.mongoSetCollection.dropSet(dbName, set);
146 146
			log.debug("Deleted set " + set + " from oaistore " + storeId + ", db: " + dbName);
147 147
			return true;
148 148
		}
modules/dnet-data-provision-services/trunk/src/main/java/eu/dnetlib/oai/sets/MongoSetCollection.java
125 125
	}
126 126

  
127 127
	public void dropSet(final String dbName, final String setSpec) {
128
		final Bson query = Filters.eq("spec", setSpec);
128
		final Bson query = Filters.eq("spec", normalizeSetSpec(setSpec));
129 129
		this.getSetsCollection(dbName).deleteMany(query);
130 130
		this.getSetsCountCollection(dbName).deleteMany(query);
131 131
	}

Also available in: Unified diff