-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Upgrade elasticsearch version to 0.19-3-SNAPSHOT to use this feature elastic/elasticsearch#1860 - Rename forceReinit to forceMapping in ElasticsearchAbstractClientFactoryBean - Add Test ElasticsearchTemplateTest.java
- Loading branch information
Showing
12 changed files
with
243 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
/.classpath | ||
/.settings | ||
/target | ||
*.iml | ||
*.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/test/java/fr/pilato/spring/elasticsearch/xml/ElasticsearchTemplateTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package fr.pilato.spring.elasticsearch.xml; | ||
|
||
import org.elasticsearch.client.Client; | ||
import org.junit.AfterClass; | ||
import org.junit.Assert; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
import org.springframework.context.ConfigurableApplicationContext; | ||
import org.springframework.context.support.ClassPathXmlApplicationContext; | ||
|
||
public class ElasticsearchTemplateTest { | ||
|
||
static protected ConfigurableApplicationContext ctx; | ||
|
||
@BeforeClass | ||
static public void setup() { | ||
ctx = new ClassPathXmlApplicationContext( | ||
"fr/pilato/spring/elasticsearch/xml/es-template-test-context.xml"); | ||
} | ||
|
||
@AfterClass | ||
static public void tearDown() { | ||
if (ctx != null) { | ||
ctx.close(); | ||
} | ||
} | ||
|
||
@Test | ||
public void test_transport_client() { | ||
Client client = ctx.getBean("esClient", Client.class); | ||
Assert.assertNotNull("Client must not be null...", client); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"template" : "twee*", | ||
"settings" : { | ||
"number_of_shards" : 1 | ||
}, | ||
"mappings" : { | ||
"tweet" : { | ||
"properties" : { | ||
"message" : { | ||
"type" : "string", | ||
"store" : "yes" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.