Skip to content

Commit

Permalink
switch from "/spell" to "/select" Solr request handler #4158
Browse files Browse the repository at this point in the history
Back in 60e640b when I was playing with spelling suggestions from Solr I
changed the request handler from "/select" (the default) to "/spell". We
didn't have time to fully explore the spelling suggestions feature of
Solr during the 4.0 rewrite and the "/spell" request handler seems to be
leading to other bugs, such as not being able to search on the
"identifier" portion of a DOI (i.e. "JNIUOA") from basic search. In
short we are switching to the default request handler for Solr,
something I would have done before tagging 4.0 if I had realized I had
left the "/spell" request handler in there.
  • Loading branch information
pdurbin committed Mar 27, 2018
1 parent dc8476d commit d3b721e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public SolrQueryResponse search(DataverseRequest dataverseRequest, Dataverse dat
solrQuery.addHighlightField(solrField);
}
solrQuery.setParam("fl", "*,score");
solrQuery.setParam("qt", "/spell");
solrQuery.setParam("qt", "/select");
solrQuery.setParam("facet", "true");
/**
* @todo: do we need facet.query?
Expand Down
5 changes: 1 addition & 4 deletions src/test/java/edu/harvard/iq/dataverse/api/SearchIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,7 @@ public void testIdentifier() {
searchUntargeted.prettyPrint();
searchUntargeted.then().assertThat()
.statusCode(OK.getStatusCode())
// FIXME: Why can't we find the dataset based on just its identifier (basic search)?
// Oddly, you *can* find from Solr directly: curl 'http://localhost:8983/solr/collection1/select?rows=1000000&wt=json&indent=true&hl=true&hl.fl=*&q=JNIUOA'
// Under "highlighting", you see "dsPersistentId":["doi:10.5072/FK2/<em>JNIUOA</em>"]
.body("data.total_count", CoreMatchers.equalTo(0));
.body("data.total_count", CoreMatchers.equalTo(1));

}

Expand Down

0 comments on commit d3b721e

Please sign in to comment.