Jean-Francois Leveque

Passage a une consultation Solr multi-core

......@@ -17,7 +17,7 @@ public class SolrJConfiguration {
*/
@Produces
public SolrClient createSolrClient() {
return new HttpSolrClient.Builder("http://localhost:8983/solr/publishers").build();
return new HttpSolrClient.Builder("http://localhost:8983/solr").build();
}
}
......
......@@ -50,7 +50,7 @@ public class PublisherSearchRepositorySolrj implements PublisherSearchRepository
SolrQuery solrQuery = new SolrQuery(string);
QueryResponse queryResponse;
try {
queryResponse = solrClient.query(solrQuery);
queryResponse = solrClient.query("publishers", solrQuery);
} catch (IOException ioe) {
throw new SearchingException(ioe);
} catch (SolrServerException sse) {
......
......@@ -84,7 +84,7 @@ public class PublisherSearchRepositorySolrjTest {
@DisplayName("when repository in IO error, should throw a SearchingException")
@Test
public void searchIOETest() throws IOException, SolrServerException{
when(solrClient.query(Mockito.any())).thenThrow(new IOException());
when(solrClient.query(Mockito.anyString(), Mockito.any())).thenThrow(new IOException());
Assertions.assertThrows(SearchingException.class, () -> publisherSearchRepository.search("a"));
}
......@@ -105,7 +105,7 @@ public class PublisherSearchRepositorySolrjTest {
public void searchParameterTest() throws IOException, SolrServerException {
try {
publisherSearchRepository.search("c");
Mockito.verify(solrClient).query(solrParamsArgumentCaptor.capture());
Mockito.verify(solrClient).query(Mockito.anyString(), solrParamsArgumentCaptor.capture());
} catch (SearchingException se) {
logger.error("SearchingException {}", se);
}
......