Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'origin/stable' into stable"
Browse files Browse the repository at this point in the history
This reverts commit a6b617d, reversing
changes made to 1560000.
  • Loading branch information
henrietteharmse committed Nov 24, 2023
1 parent a6b617d commit 9462a71
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void search(

Map<String, Object> responseBody = new HashMap<>();
responseBody.put("numFound", qr.getResults().getNumFound());
responseBody.put("start", start);
responseBody.put("start", 0);
responseBody.put("docs", docs);

Map<String, Object> responseObj = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public SolrQuery constructQuery() {
if(qf.length() > 0) {
qf.append(" ");
}
qf.append(ClientUtils.escapeQueryChars( getSolrPropertyName(searchField.propertyName, exactMatch ? SearchType.WHOLE_FIELD : searchField.searchType)) );
qf.append(ClientUtils.escapeQueryChars( getSolrPropertyName(searchField.propertyName,
exactMatch ? SearchType.WHOLE_FIELD : searchField.searchType)) );
qf.append("^");
qf.append(searchField.weight);
}
Expand Down Expand Up @@ -177,22 +178,25 @@ public BoostField(String propertyName, String propertyValue, int weight, SearchT
}

private String getSolrPropertyName(String propertyName, SearchType searchType) {
switch(searchType) {
case CASE_INSENSITIVE_TOKENS:
return "lowercase_" + propertyName;
case CASE_SENSITIVE_TOKENS:
return propertyName;
case WHOLE_FIELD:
return "str_" + propertyName;
case EDGES:
return "edge_" + propertyName;
case WHITESPACE:
return "whitespace_" + propertyName;
case WHITESPACE_EDGES:
return "whitespace_edge_" + propertyName;
default:
throw new RuntimeException("unknown filter accuracy");
}
if (propertyName.compareTo("_json") == 0)
return propertyName;
else
switch(searchType) {
case CASE_INSENSITIVE_TOKENS:
return "lowercase_" + propertyName;
case CASE_SENSITIVE_TOKENS:
return propertyName;
case WHOLE_FIELD:
return "str_" + propertyName;
case EDGES:
return "edge_" + propertyName;
case WHITESPACE:
return "whitespace_" + propertyName;
case WHITESPACE_EDGES:
return "whitespace_edge_" + propertyName;
default:
throw new RuntimeException("unknown filter accuracy");
}
}

private String getSolrPropertyValue(String propertyValue, SearchType searchType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static void addSearchFieldsToQuery(OlsSolrQuery query, String searchField
query.addSearchField(field.property, field.weight, SearchType.CASE_INSENSITIVE_TOKENS);
}
}
query.addSearchField("_json", 1, SearchType.CASE_INSENSITIVE_TOKENS);
}

public static void addBoostFieldsToQuery(OlsSolrQuery query, String boostFields) {
Expand Down
1 change: 0 additions & 1 deletion frontend/src/pages/ontologies/ontologiesSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export const getEntityWithType = createAsyncThunk(
{ rejectWithValue }
) => {
const apiSearchParams = mapToApiParams(searchParams);
apiSearchParams.set("includeObsoleteEntities", "true");
const doubleEncodedTermUri = encodeURIComponent(
encodeURIComponent(entityIri)
);
Expand Down

0 comments on commit 9462a71

Please sign in to comment.