summaryrefslogtreecommitdiffstats
path: root/components/enhanced_bookmarks/proto
diff options
context:
space:
mode:
authornoyau <noyau@chromium.org>2014-09-12 03:19:39 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-12 10:21:16 +0000
commitf0e1e779e3acf7e18093550dc775e44b812a3286 (patch)
tree7e876cfc585e2125e3730162e7e30018ab5e6ab2 /components/enhanced_bookmarks/proto
parentfa32f2e56ac125ff2c95f35473f123a8d2bc2012 (diff)
downloadchromium_src-f0e1e779e3acf7e18093550dc775e44b812a3286.zip
chromium_src-f0e1e779e3acf7e18093550dc775e44b812a3286.tar.gz
chromium_src-f0e1e779e3acf7e18093550dc775e44b812a3286.tar.bz2
Bring up of the server side full text search.
This class is used to perform a full text search on bookmarks, powered by the server side. The superclass will be used for other services in subsequent CLs. BUG=None Review URL: https://codereview.chromium.org/538903003 Cr-Commit-Position: refs/heads/master@{#294571}
Diffstat (limited to 'components/enhanced_bookmarks/proto')
-rw-r--r--components/enhanced_bookmarks/proto/BUILD.gn1
-rw-r--r--components/enhanced_bookmarks/proto/search.proto30
2 files changed, 31 insertions, 0 deletions
diff --git a/components/enhanced_bookmarks/proto/BUILD.gn b/components/enhanced_bookmarks/proto/BUILD.gn
index ddea52b..f6e932d 100644
--- a/components/enhanced_bookmarks/proto/BUILD.gn
+++ b/components/enhanced_bookmarks/proto/BUILD.gn
@@ -7,5 +7,6 @@ import("//third_party/protobuf/proto_library.gni")
proto_library("proto") {
sources = [
"metadata.proto",
+ "search.proto",
]
}
diff --git a/components/enhanced_bookmarks/proto/search.proto b/components/enhanced_bookmarks/proto/search.proto
new file mode 100644
index 0000000..df508ab
--- /dev/null
+++ b/components/enhanced_bookmarks/proto/search.proto
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+syntax = "proto2";
+option optimize_for = LITE_RUNTIME;
+
+package image.collections;
+
+// Contains the result of a full text search.
+message CorpusSearchResult {
+ // Encodes the status of the response.
+ enum Status {
+ UNKNOWN = 0;
+ OK = 1;
+ FAILED_RPC = 2;
+ NO_VALID_BACKEND = 3;
+ INVALID_INPUT = 4;
+ }
+ optional Status status = 1;
+
+ // For each results returns the clip id, the title and a snippet highlighting
+ // the context of the match on the search term.
+ message ClipResult {
+ optional string clip_id = 1;
+ optional string title = 2;
+ optional string snippet = 3;
+ }
+ repeated ClipResult results = 2;
+}