@@ -30,61 +30,61 @@ interface ElasticDocument : ElasticService {
30
30
* Add document to index.
31
31
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html)
32
32
*/
33
- fun indexWithId (index : String , type : String , id : String ): ServiceCall <ByteString , IndexResult >
33
+ fun indexWithId (index : String , id : String ): ServiceCall <ByteString , IndexResult >
34
34
35
35
/* *
36
36
* Retrieve document with meta from index.
37
37
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html)
38
38
*/
39
- fun get (index : String , type : String , id : String ): ServiceCall <NotUsed , ByteString >
39
+ fun get (index : String , id : String ): ServiceCall <NotUsed , ByteString >
40
40
41
41
/* *
42
42
* Retrieve document (only source) from index.
43
43
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#_source)
44
44
*/
45
- fun getSource (index : String , type : String , id : String ): ServiceCall <NotUsed , ByteString >
45
+ fun getSource (index : String , id : String ): ServiceCall <NotUsed , ByteString >
46
46
47
47
/* *
48
48
* Check the document exists on index.
49
49
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#docs-get)
50
50
*/
51
- fun exists (index : String , type : String , id : String ): ServiceCall <NotUsed , Done >
51
+ fun exists (index : String , id : String ): ServiceCall <NotUsed , Done >
52
52
53
53
/* *
54
54
* Check the document source exists on index.
55
55
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html#_source)
56
56
*/
57
- fun existsSource (index : String , type : String , id : String ): ServiceCall <NotUsed , Done >
57
+ fun existsSource (index : String , id : String ): ServiceCall <NotUsed , Done >
58
58
59
59
/* *
60
60
* Executing bulk requests.
61
61
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html)
62
62
*/
63
- fun bulk (index : String , type : String ): ServiceCall <BulkRequest , BulkResult >
63
+ fun bulk (index : String ): ServiceCall <BulkRequest , BulkResult >
64
64
65
65
/* *
66
66
* Executes update document requests.
67
67
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html)
68
68
*/
69
- fun update (index : String , type : String , id : String ): ServiceCall <ByteString , UpdateResult >
69
+ fun update (index : String , id : String ): ServiceCall <ByteString , UpdateResult >
70
70
71
71
/* *
72
72
* Executes delete document requests.
73
73
* See also [Elasticsearch Docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html)
74
74
*/
75
- fun delete (index : String , type : String , id : String ): ServiceCall <NotUsed , DeleteResult >
75
+ fun delete (index : String , id : String ): ServiceCall <NotUsed , DeleteResult >
76
76
77
77
@JvmDefault
78
78
override fun descriptor (): Descriptor {
79
79
return named(" elastic-document" ).withCalls(
80
- restCall<ByteString , IndexResult >(PUT , " /:index/:type /:id" , ElasticDocument ::indexWithId.javaMethod),
81
- restCall<NotUsed , ByteString >(GET , " /:index/:type /:id" , ElasticDocument ::get.javaMethod),
82
- restCall<NotUsed , Done >(HEAD , " /:index/:type /:id" , ElasticDocument ::exists.javaMethod),
83
- restCall<NotUsed , ByteString >(GET , " /:index/:type /:id/_source " , ElasticDocument ::getSource.javaMethod),
84
- restCall<NotUsed , Done >(HEAD , " /:index/:type /:id/_source " , ElasticDocument ::existsSource.javaMethod),
85
- restCall<BulkRequest , BulkResult >(POST , " /:index/:type/ _bulk" , ElasticDocument ::bulk.javaMethod),
86
- restCall<ByteString , UpdateResult >(POST , " /:index/:type /:id/_update " , ElasticDocument ::update.javaMethod),
87
- restCall<NotUsed , DeleteResult >(DELETE , " /:index/:type /:id" , ElasticDocument ::delete.javaMethod)
80
+ restCall<ByteString , IndexResult >(PUT , " /:index/_doc /:id" , ElasticDocument ::indexWithId.javaMethod),
81
+ restCall<NotUsed , ByteString >(GET , " /:index/_doc /:id" , ElasticDocument ::get.javaMethod),
82
+ restCall<NotUsed , Done >(HEAD , " /:index/_doc /:id" , ElasticDocument ::exists.javaMethod),
83
+ restCall<NotUsed , ByteString >(GET , " /:index/_source /:id" , ElasticDocument ::getSource.javaMethod),
84
+ restCall<NotUsed , Done >(HEAD , " /:index/_source /:id" , ElasticDocument ::existsSource.javaMethod),
85
+ restCall<BulkRequest , BulkResult >(POST , " /:index/_bulk" , ElasticDocument ::bulk.javaMethod),
86
+ restCall<ByteString , UpdateResult >(POST , " /:index/_update /:id" , ElasticDocument ::update.javaMethod),
87
+ restCall<NotUsed , DeleteResult >(DELETE , " /:index/_doc /:id" , ElasticDocument ::delete.javaMethod)
88
88
)
89
89
.withSerializerFactory(ElasticSerializerFactory (objectMapper()))
90
90
}
0 commit comments