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 3d3413e commit 6b9f2f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public class EntityCustomScalesValuesHistory {
public static final String PROJECT_ID = "projectId";
public static final String CUSTOM_SCALE_REVISIONS = "postCoordinationCustomScalesRevisions";
@Field(WHOFIC_ENTITY_IRI)
@Indexed(name = "entityIriScales")
@Indexed(name = "entityIriScales_idx")
private final String whoficEntityIri;

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

@Field(CUSTOM_SCALE_REVISIONS)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package edu.stanford.protege.webprotege.postcoordinationservice.model;

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.*;

import java.util.*;

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


Expand All @@ -18,11 +23,11 @@ public class EntityPostCoordinationHistory {
public static final String SPEC_REVISIONS = "postCoordinationRevisions";

@Field(WHOFIC_ENTITY_IRI)
@Indexed(name = "entityIriSpec")
@Indexed(name = "entityIriSpec_idx")
private final String whoficEntityIri;

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

@Field(SPEC_REVISIONS)
Expand Down

0 comments on commit 6b9f2f9

Please sign in to comment.