-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexing.proto
executable file
·58 lines (50 loc) · 1.99 KB
/
indexing.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
54
55
56
57
58
syntax = "proto3";
import "custom_dim.proto";
option java_package = "com.vectara.indexing";
option java_outer_classname = "IndexingProtos";
option go_package = "vectara.com/public/proto/indexing";
package com.vectara.indexing;
// A section within a structured document.
message Section {
// Optionally, the unique ID of this section. If set, it will be returned as
// metadata in query results.
int32 id = 1;
// Optionally, the title of the section. This may be empty.
string title = 2;
// The text of the section. This should never be empty.
string text = 3;
// Metadata about this section. This should be a json string. It is passed
// through the system, without being used at indexing time. It can be
// retrieved at query time.
string metadata_json = 4;
// A list of custom dimension values that are included in the generated
// representation of all subsections (i.e. sections contains by this section).
repeated CustomDimension custom_dims = 5;
// A list of subsections.
repeated Section section = 10;
}
// A document to index.
message Document {
// Client assigned document ID to this document.
string document_id = 1;
// The title of the document.
string title = 2;
// An optional description for the document.
string description = 3;
// Metadata about the document. This is a string containing a JSON
// object. It can be an arbitrary object except that any keys
// that match a metadata filter of the corpus must have the
// same value type as metadata filter's value type.
//
// A query can use this object to filter if the object's key/value pair
// has been defined as a metadata filter.
//
// The whole object will be in the query result.
string metadata_json = 4;
// A list of custom dimension values that are included in the generated
// representation of all sections.
repeated CustomDimension custom_dims = 5;
// The actual content of the document, structured as a repeating list
// of sections.
repeated Section section = 10;
}