blob: 64c2e2b4ac405f01ec952ec2217277ac86105403 (
plain)
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
59
|
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package icing;
// Defines a unit of data understood by the IcingSearchEngine.
// Next tag: 6
message DocumentProto {
// REQUIRED: Namespace that this Document resides in.
// Namespaces can affect read/write permissions.
optional string namespace = 1;
// REQUIRED: Identifier of the Document; must be unique within the
// Document's `namespace`. Otherwise, the new Document will override any
// other Documents with the same `namespace`+`uri` that Icing knows about.
optional string uri = 2;
// REQUIRED: Type of the Document. This should match the 'schema_type' of
// one of the types given to Icing as part of the overall schema.
// See icing.SchemaTypeConfigProto.schema_type for details.
optional string schema = 3;
// Milliseconds since epoch at which the Document was created. If not
// specified, it will default to when the Icing receives the Document.
optional uint64 creation_timestamp_ms = 4;
repeated PropertyProto properties = 5;
}
// Holds a property field of the Document.
// Next tag: 8
message PropertyProto {
// Name of the property. This should be the same as one of the properties
// already defined in the schema for this Document's schema_type.
// See icing.PropertyConfigProto.property_name for details.
optional string name = 1;
// Only the field corresponding to the DataType specified in
// icing.PropertyConfigProto.data_type should be set.
repeated string string_values = 2;
repeated int64 int64_values = 3;
repeated double double_values = 4;
repeated bool boolean_values = 5;
repeated bytes bytes_values = 6;
repeated DocumentProto document_values = 7;
}
|