# 集成

```java
public TransportClient client(){
    InetSocketTransportAddress node =new InetSocketTransportAddress(
    InetAddress.getByName("localhost"),9300);
    Setting settrings=Settings.builder().put("cluster.name","wali").build();
    TransportClient client=new PreBuiltTransportClient(Settings,EMPTY);
    client.addTransportAddress(node);
    return client;
}
```

获取

```java
GetResponnse result=this.client.preprareGet("book","novel",id).setSource().get();
```

增加

```java
XcontentFactory.jsonBuilder()
.startObject()
.field("title",title)
.field("author",author)
.field("word_count",wordCount)
.field("publist_data",publishData.getTime())
.endObject();
result=this.client.preprareGet("book","novel",id).setSource().get();
```

删除

```java
this.client.prepareDelete("book",)
```

更新接口
