Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
#248: completed update to Solr 7.5.0
Browse files Browse the repository at this point in the history
* Needed to upgrade `io.dropwizard.metrics` dependencies as Solr 7 requires a newer version as used by Spring.
* more updates to the `schema.xml` of the conversation index
* needed to enable `content.streams` in the `solrconf.xml` as default changed to disabled for Solr 7
* needed to change MLT requests as Content Streams changed in SolrJ
* explicitly added the `mlt.fl` for all MLT requests
* excluded the current conversation for MLT requests in the ConversationMLT query builder
* excluded the Spring SolrAutoConfiguration from AutoConfiguration for all Spring Unit Tests (was already excluded for `SmartiApplication` in previous releases)
* Needed to adapt the RocketChatSearchQueryBuilder FieldAnalysis functionality because of an API change in SolrJ

#289 - removed Chatpal Backend Webservice and remaining dependencies in the smarti application module
  • Loading branch information
westei committed Oct 9, 2018
1 parent 46e69ed commit e136592
Show file tree
Hide file tree
Showing 13 changed files with 126 additions and 352 deletions.
10 changes: 0 additions & 10 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,6 @@
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>io.redlink.smarti</groupId>
<artifactId>chatpal-index</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Analysis -->
<!-- (1) we need to detect the language -->
<dependency>
Expand Down Expand Up @@ -491,10 +485,6 @@
<groupId>io.redlink.smarti</groupId>
<artifactId>query-conversation</artifactId>
</dependency>
<dependency> <!-- for the chatpal solr config -->
<groupId>io.redlink.smarti</groupId>
<artifactId>chatpal-index</artifactId>
</dependency>
</requiresUnpack>
<!-- GPL licensed, needs to be installed manually -->
<excludes>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -106,7 +107,7 @@
@ActiveProfiles("test")
//@WebAppConfiguration
//@EnableMongoRepositories(basePackageClasses={ConversationRepository.class, ClientRepository.class, ConfigurationRepo.class})
@EnableAutoConfiguration
@EnableAutoConfiguration(exclude={SolrAutoConfiguration.class})
public class ConversationWebserviceIT {

private final Logger log = LoggerFactory.getLogger(getClass());
Expand Down Expand Up @@ -1318,8 +1319,8 @@ public void testQueryExecution() throws Exception {
String supportArea2 = "integration test";
Map<String,List<String>> supportAreaMessages = new HashMap<>();
supportAreaMessages.put(supportArea1, Arrays.asList(
"Wie kann in eine Komponente mit Abhängigkeiten testen?",
"Wie definiere ich die jenigen Spring Komponenten welche ich für einen Test benötige",
"Eine Banane hat nicht mit diesem Context zu tun",
"Wie definiere ich die jenigen Spring Komponenten welche ich für einen Unit Test benötige",
"Funktioniert das automatische Binden von Komponenten bei Unit Tests?",
"Kann ich Komponenten auch im @BeforeClass verwenden?",
"Werden Spring Komponenten für mehrere Unit Tests wiederverwendet?",
Expand Down Expand Up @@ -1425,7 +1426,7 @@ public void testQueryExecution() throws Exception {
String[] expectedResults = new String[]{
conversations.get(5).getId().toHexString(),
conversations.get(4).getId().toHexString(),
conversations.get(2).getId().toHexString()};
conversations.get(1).getId().toHexString()};
Conversation bestResult = conversations.get(5);
Message bestMessage = bestResult.getMessages().get(0);

Expand All @@ -1437,7 +1438,7 @@ public void testQueryExecution() throws Exception {
.content(conversationJson))
.andDo(MockMvcResultHandlers.print())
.andExpect(MockMvcResultMatchers.status().is(200))
.andExpect(jsonPath("numFound").value(5)) //5 of 6 have words in common
.andExpect(jsonPath("numFound").value(4)) //4 of 6 have words in common
.andExpect(jsonPath("start").value(0))
.andExpect(jsonPath("pageSize").value(3))
.andExpect(jsonPath("docs").isArray())
Expand Down
5 changes: 2 additions & 3 deletions lib/query-conversation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,19 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.redlink.solrlib</groupId>
<artifactId>solrlib-embedded</artifactId>
<version>${solrlib.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down
Loading

0 comments on commit e136592

Please sign in to comment.