Skip to content

Commit

Permalink
Fixes for #498, #540 and #542.
Browse files Browse the repository at this point in the history
  • Loading branch information
henrietteharmse committed Oct 10, 2023
1 parent 1dec2ec commit 3838dd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void search(
if (queryFields == null) {
// if exact just search the supplied fields for exact matches
if (exact) {
String[] fields = {"label_s", "synonym_s", "short_form_s", "obo_id_s", "iri_s", "annotations_trimmed"};
String[] fields = {"label_s", "synonym_s", "short_form_s", "obo_id_s", "iri_s", "_json"};
solrQuery.setQuery(
"((" +
createUnionQuery(query.toLowerCase(), SolrFieldMapper.mapFieldsList(List.of(fields)).toArray(new String[0]), true)
Expand Down Expand Up @@ -101,7 +101,7 @@ public void search(
} else {

solrQuery.set("defType", "edismax");
solrQuery.setQuery(query);
solrQuery.setQuery(query.toLowerCase());
solrQuery.set("qf", String.join(" ", SolrFieldMapper.mapFieldsList(queryFields)));
}
}
Expand Down
9 changes: 5 additions & 4 deletions dataload/solr_config/ols4_entities/conf/managed-schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
-->

<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="iri" type="string" indexed="true" stored="true" required="true" multiValued="false" />

<!-- docValues are enabled by default for long type so we don't need to index the version field -->
<field name="_version_" type="plong" indexed="false" stored="false"/>
Expand Down Expand Up @@ -280,13 +281,13 @@
<filter name="synonymGraph" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
<filter name="flattenGraph"/>
-->
<!--<filter name="lowercase"/>-->
<filter name="lowercase"/>
</analyzer>
<analyzer type="query">
<tokenizer name="standard"/>
<filter name="stop" ignoreCase="true" words="stopwords.txt" />
<filter name="synonymGraph" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<!--<filter name="lowercase"/>-->
<filter name="lowercase"/>
</analyzer>
</fieldType>
<fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true">
Expand All @@ -297,13 +298,13 @@
<filter name="synonymGraph" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
<filter name="flattenGraph"/>
-->
<!--<filter name="lowercase"/>-->
<filter name="lowercase"/><!-- Todo #498 -->
</analyzer>
<analyzer type="query">
<tokenizer name="standard"/>
<filter name="stop" ignoreCase="true" words="stopwords.txt" />
<filter name="synonymGraph" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
<!--<filter name="lowercase"/>-->
<filter name="lowercase"/><!-- Todo #498 -->
</analyzer>
</fieldType>

Expand Down

0 comments on commit 3838dd4

Please sign in to comment.