Skip to content

Commit

Permalink
added projectid index
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsilaghi committed Dec 9, 2024
1 parent 0c211f4 commit 3d3413e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@


import com.fasterxml.jackson.annotation.*;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.*;

Expand All @@ -11,6 +13,9 @@

@JsonIgnoreProperties(ignoreUnknown = true)
@Document(collection = POSTCOORDINATION_CUSTOM_SCALES_COLLECTION)
@CompoundIndexes({
@CompoundIndex(name = "entity_iri_project_idx", def = "{'" + EntityCustomScalesValuesHistory.WHOFIC_ENTITY_IRI + "': 1, '" + EntityCustomScalesValuesHistory.PROJECT_ID + "': 1}")
})
public class EntityCustomScalesValuesHistory {

public static final String POSTCOORDINATION_CUSTOM_SCALES_COLLECTION = "EntityPostCoordinationCustomScales";
Expand All @@ -23,6 +28,7 @@ public class EntityCustomScalesValuesHistory {
private final String whoficEntityIri;

@Field(PROJECT_ID)
@Indexed(name = "entityProjectId")
private final String projectId;

@Field(CUSTOM_SCALE_REVISIONS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class EntityPostCoordinationHistory {
private final String whoficEntityIri;

@Field(PROJECT_ID)
@Indexed(name = "entityIriProjectId")
private final String projectId;

@Field(SPEC_REVISIONS)
Expand Down

0 comments on commit 3d3413e

Please sign in to comment.