Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/FriedJannik/basyx-ja…
Browse files Browse the repository at this point in the history
…va-components into development
  • Loading branch information
FriedJannik committed Aug 10, 2023
2 parents 70a4bb6 + fb21ac9 commit ed22c88
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import static org.springframework.data.mongodb.core.query.Criteria.where;
import static org.springframework.data.mongodb.core.query.Query.query;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -44,10 +43,11 @@
import org.eclipse.basyx.submodel.metamodel.map.qualifier.Identifiable;
import org.eclipse.basyx.submodel.metamodel.map.submodelelement.dataelement.File;
import org.eclipse.basyx.vab.exception.provider.ResourceNotFoundException;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.mongodb.core.FindAndReplaceOptions;
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.index.TextIndexDefinition;
import org.springframework.data.mongodb.core.index.Index;
import org.springframework.data.mongodb.core.query.Query;

import com.mongodb.client.MongoClient;
Expand Down Expand Up @@ -87,7 +87,7 @@ public MongoDBBaSyxStorageAPI(String collectionName, Class<T> type, BaSyxMongoDB
}

private void configureIndexKey() {
TextIndexDefinition idIndex = TextIndexDefinition.builder().onField(INDEX_KEY).build();
Index idIndex = new Index().on(INDEX_KEY, Direction.ASC);
this.mongoOps.indexOps(TYPE).ensureIndex(idIndex);
}

Expand Down

0 comments on commit ed22c88

Please sign in to comment.