-
Notifications
You must be signed in to change notification settings - Fork 0
/
core_services.proto
executable file
·53 lines (42 loc) · 1.53 KB
/
core_services.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// These are public services that we only share with some of our customers.
syntax = "proto3";
import "common.proto";
import "indexing_core.proto";
import "status.proto";
import "google/api/annotations.proto";
option java_package = "com.vectara";
option java_outer_classname = "CoreServiceProtos";
option go_package = "vectara.com/public/proto/coreservices";
package com.vectara;
// Request to index a document.
message IndexCoreDocumentRequest {
// The Customer ID to issue the request for.
int64 customer_id = 1;
// The Corpus ID to index the document into.
int64 corpus_id = 2;
// The document being indexed.
com.vectara.indexing.CoreDocument document = 3;
}
message IndexCoreDocumentResponse {
// Refer to IndexDocumentResponse in services.proto for the indexing error responses.
Status status = 1;
// The storage quota needed for the document indexed in the request.
// If "status" is ALREADY_EXISTS, it means that the document was already in the index prior to
// this request. In such cases, quota is not consumed again and the value in this field
// represents the quota consumed when the document was indexed the first time.
StorageQuota quota_consumed = 2;
}
service CoreIndexService {
rpc Index(IndexCoreDocumentRequest) returns (IndexCoreDocumentResponse) {
option (google.api.http) = {
post: "/v1/core/index"
body: "*"
};
}
rpc Delete(DeleteDocumentRequest) returns (DeleteDocumentResponse) {
option (google.api.http) = {
post: "/v1/core/delete-doc"
body: "*"
};
}
}