mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-07-29 05:33:30 +00:00
Merge branch 'master' of https://github.com/BioMedCentralLtd/spring-data-elasticsearch
This commit is contained in:
commit
25e70d6c8d
25
README.md
25
README.md
@ -169,13 +169,15 @@ Indexing multiple Document(bulk index) using Repository
|
|||||||
|
|
||||||
You can set up repository scanning via xml configuration, which will happily create your repositories.
|
You can set up repository scanning via xml configuration, which will happily create your repositories.
|
||||||
|
|
||||||
|
Using Node Client
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
|
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
|
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
|
||||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
|
||||||
|
|
||||||
<elasticsearch:node-client id="client" local="true"/>
|
<elasticsearch:node-client id="client" local="true"/>
|
||||||
|
|
||||||
@ -185,3 +187,24 @@ You can set up repository scanning via xml configuration, which will happily cre
|
|||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Using Transport Client
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:elasticsearch="http://www.springframework.org/schema/data/elasticsearch"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/data/elasticsearch http://www.springframework.org/schema/data/elasticsearch/spring-elasticsearch-1.0.xsd
|
||||||
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
|
||||||
|
|
||||||
|
<elasticsearch:repositories base-package="com.xyz.acme"/>
|
||||||
|
|
||||||
|
<elasticsearch:transport-client id="client" cluster-nodes="localhost:9300,someip:9300" />
|
||||||
|
|
||||||
|
<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
|
||||||
|
<constructor-arg name="client" ref="client"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
</beans>
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user