github.com/timstclair/heapster@v0.20.0-alpha1/Godeps/_workspace/src/google.golang.org/appengine/internal/search/search.proto (about)

     1  syntax = "proto2";
     2  option go_package = "search";
     3  
     4  package search;
     5  
     6  message Scope {
     7    enum Type {
     8      USER_BY_CANONICAL_ID = 1;
     9      USER_BY_EMAIL = 2;
    10      GROUP_BY_CANONICAL_ID = 3;
    11      GROUP_BY_EMAIL = 4;
    12      GROUP_BY_DOMAIN = 5;
    13      ALL_USERS = 6;
    14      ALL_AUTHENTICATED_USERS = 7;
    15    }
    16  
    17    optional Type type = 1;
    18    optional string value = 2;
    19  }
    20  
    21  message Entry {
    22    enum Permission {
    23      READ = 1;
    24      WRITE = 2;
    25      FULL_CONTROL = 3;
    26    }
    27  
    28    optional Scope scope = 1;
    29    optional Permission permission = 2;
    30    optional string display_name = 3;
    31  }
    32  
    33  message AccessControlList {
    34    optional string owner = 1;
    35    repeated Entry entries = 2;
    36  }
    37  
    38  message FieldValue {
    39    enum ContentType {
    40      TEXT = 0;
    41      HTML = 1;
    42      ATOM = 2;
    43      DATE = 3;
    44      NUMBER = 4;
    45      GEO = 5;
    46    }
    47  
    48    optional ContentType type = 1 [default = TEXT];
    49  
    50    optional string language = 2 [default = "en"];
    51  
    52    optional string string_value = 3;
    53  
    54    optional group Geo = 4 {
    55      required double lat = 5;
    56      required double lng = 6;
    57    }
    58  }
    59  
    60  message Field {
    61    required string name = 1;
    62    required FieldValue value = 2;
    63  }
    64  
    65  message FieldTypes {
    66    required string name = 1;
    67    repeated FieldValue.ContentType type = 2;
    68  }
    69  
    70  message IndexShardSettings {
    71    repeated int32 prev_num_shards = 1;
    72    required int32 num_shards = 2 [default=1];
    73    repeated int32 prev_num_shards_search_false = 3;
    74    optional string local_replica = 4 [default = ""];
    75  }
    76  
    77  message FacetValue {
    78    enum ContentType {
    79      ATOM = 2;
    80      NUMBER = 4;
    81    }
    82  
    83    optional ContentType type = 1 [default = ATOM];
    84    optional string string_value = 3;
    85  }
    86  
    87  message Facet {
    88    required string name = 1;
    89    required FacetValue value = 2;
    90  }
    91  
    92  message DocumentMetadata  {
    93    optional int64 version = 1;
    94    optional int64 committed_st_version = 2;
    95  }
    96  
    97  message Document {
    98    optional string id = 1;
    99    optional string language = 2 [default = "en"];
   100    repeated Field field = 3;
   101    optional int32 order_id = 4;
   102  
   103    enum Storage {
   104      DISK = 0;
   105    }
   106  
   107    optional Storage storage = 5 [default = DISK];
   108    repeated Facet facet = 8;
   109  }
   110  
   111  message SearchServiceError {
   112    enum ErrorCode {
   113      OK = 0;
   114      INVALID_REQUEST = 1;
   115      TRANSIENT_ERROR = 2;
   116      INTERNAL_ERROR = 3;
   117      PERMISSION_DENIED = 4;
   118      TIMEOUT = 5;
   119      CONCURRENT_TRANSACTION = 6;
   120    }
   121  }
   122  
   123  message RequestStatus {
   124    required SearchServiceError.ErrorCode code = 1;
   125    optional string error_detail = 2;
   126    optional int32 canonical_code = 3;
   127  }
   128  
   129  message IndexSpec {
   130    required string name = 1;
   131  
   132    enum Consistency {
   133      GLOBAL = 0;
   134      PER_DOCUMENT = 1;
   135    }
   136    optional Consistency consistency = 2 [default = PER_DOCUMENT];
   137  
   138    optional string namespace = 3;
   139    optional int32 version = 4;
   140  
   141    enum Source {
   142      SEARCH = 0;
   143      DATASTORE = 1;
   144      CLOUD_STORAGE = 2;
   145    }
   146    optional Source source = 5 [default = SEARCH];
   147  
   148    enum Mode {
   149      PRIORITY = 0;
   150      BACKGROUND = 1;
   151    }
   152    optional Mode mode = 6 [default = PRIORITY];
   153  }
   154  
   155  message IndexMetadata {
   156    required IndexSpec index_spec = 1;
   157  
   158    repeated FieldTypes field = 2;
   159  
   160    message Storage {
   161      optional int64 amount_used = 1;
   162      optional int64 limit = 2;
   163    }
   164    optional Storage storage = 3;
   165  }
   166  
   167  message IndexDocumentParams {
   168    repeated Document document = 1;
   169  
   170    enum Freshness {
   171      SYNCHRONOUSLY = 0;
   172      WHEN_CONVENIENT = 1;
   173    }
   174    optional Freshness freshness = 2 [default = SYNCHRONOUSLY, deprecated=true];
   175  
   176    required IndexSpec index_spec = 3;
   177  }
   178  
   179  message IndexDocumentRequest {
   180    required IndexDocumentParams params = 1;
   181  
   182    optional bytes app_id = 3;
   183  }
   184  
   185  message IndexDocumentResponse {
   186    repeated RequestStatus status = 1;
   187  
   188    repeated string doc_id = 2;
   189  }
   190  
   191  message DeleteDocumentParams {
   192    repeated string doc_id = 1;
   193  
   194    required IndexSpec index_spec = 2;
   195  }
   196  
   197  message DeleteDocumentRequest {
   198    required DeleteDocumentParams params = 1;
   199  
   200    optional bytes app_id = 3;
   201  }
   202  
   203  message DeleteDocumentResponse {
   204    repeated RequestStatus status = 1;
   205  }
   206  
   207  message ListDocumentsParams {
   208    required IndexSpec index_spec = 1;
   209    optional string start_doc_id = 2;
   210    optional bool include_start_doc = 3 [default = true];
   211    optional int32 limit = 4 [default = 100];
   212    optional bool keys_only = 5;
   213  }
   214  
   215  message ListDocumentsRequest {
   216    required ListDocumentsParams params = 1;
   217  
   218    optional bytes app_id = 2;
   219  }
   220  
   221  message ListDocumentsResponse {
   222    required RequestStatus status = 1;
   223  
   224    repeated Document document = 2;
   225  }
   226  
   227  message ListIndexesParams {
   228    optional bool fetch_schema = 1;
   229    optional int32 limit = 2 [default = 20];
   230    optional string namespace = 3;
   231    optional string start_index_name = 4;
   232    optional bool include_start_index = 5 [default = true];
   233    optional string index_name_prefix = 6;
   234    optional int32 offset = 7;
   235    optional IndexSpec.Source source = 8 [default = SEARCH];
   236  }
   237  
   238  message ListIndexesRequest {
   239    required ListIndexesParams params = 1;
   240  
   241    optional bytes app_id = 3;
   242  }
   243  
   244  message ListIndexesResponse {
   245    required RequestStatus status = 1;
   246    repeated IndexMetadata index_metadata = 2;
   247  }
   248  
   249  message DeleteSchemaParams {
   250    optional IndexSpec.Source source = 1 [default = SEARCH];
   251    repeated IndexSpec index_spec = 2;
   252  }
   253  
   254  message DeleteSchemaRequest {
   255    required DeleteSchemaParams params = 1;
   256  
   257    optional bytes app_id = 3;
   258  }
   259  
   260  message DeleteSchemaResponse {
   261    repeated RequestStatus status = 1;
   262  }
   263  
   264  message SortSpec {
   265    required string sort_expression = 1;
   266    optional bool sort_descending = 2 [default = true];
   267    optional string default_value_text = 4;
   268    optional double default_value_numeric = 5;
   269  }
   270  
   271  message ScorerSpec {
   272    enum Scorer {
   273      RESCORING_MATCH_SCORER = 0;
   274      MATCH_SCORER = 2;
   275    }
   276    optional Scorer scorer = 1 [default = MATCH_SCORER];
   277  
   278    optional int32 limit = 2 [default = 1000];
   279    optional string match_scorer_parameters = 9;
   280  }
   281  
   282  message FieldSpec {
   283    repeated string name = 1;
   284  
   285    repeated group Expression = 2 {
   286      required string name = 3;
   287      required string expression = 4;
   288    }
   289  }
   290  
   291  message FacetRange {
   292    optional string name = 1;
   293    optional string start = 2;
   294    optional string end = 3;
   295  }
   296  
   297  message FacetRequestParam {
   298    optional int32 value_limit = 1;
   299    repeated FacetRange range = 2;
   300    repeated string value_constraint = 3;
   301  }
   302  
   303  message FacetAutoDetectParam {
   304    optional int32 value_limit = 1 [default = 10];
   305  }
   306  
   307  message FacetRequest {
   308    required string name = 1;
   309    optional FacetRequestParam params = 2;
   310  }
   311  
   312  message FacetRefinement {
   313    required string name = 1;
   314    optional string value = 2;
   315  
   316    message Range {
   317      optional string start = 1;
   318      optional string end = 2;
   319    }
   320    optional Range range = 3;
   321  }
   322  
   323  message SearchParams {
   324    required IndexSpec index_spec = 1;
   325    required string query = 2;
   326    optional string cursor = 4;
   327    optional int32 offset = 11;
   328  
   329    enum CursorType {
   330      NONE = 0;
   331      SINGLE = 1;
   332      PER_RESULT = 2;
   333    }
   334    optional CursorType cursor_type = 5 [default = NONE];
   335  
   336    optional int32 limit = 6 [default = 20];
   337    optional int32 matched_count_accuracy = 7;
   338    repeated SortSpec sort_spec = 8;
   339    optional ScorerSpec scorer_spec = 9;
   340    optional FieldSpec field_spec = 10;
   341    optional bool keys_only = 12;
   342  
   343    enum ParsingMode {
   344      STRICT = 0;
   345      RELAXED = 1;
   346    }
   347    optional ParsingMode parsing_mode = 13 [default = STRICT];
   348  
   349    optional int32 auto_discover_facet_count = 15 [default = 0];
   350    repeated FacetRequest include_facet = 16;
   351    repeated FacetRefinement facet_refinement = 17;
   352    optional FacetAutoDetectParam facet_auto_detect_param = 18;
   353    optional int32 facet_depth = 19 [default=1000];
   354  }
   355  
   356  message SearchRequest {
   357    required SearchParams params = 1;
   358  
   359    optional bytes app_id = 3;
   360  }
   361  
   362  message FacetResultValue {
   363    required string name = 1;
   364    required int32 count = 2;
   365    required FacetRefinement refinement = 3;
   366  }
   367  
   368  message FacetResult {
   369    required string name = 1;
   370    repeated FacetResultValue value = 2;
   371  }
   372  
   373  message SearchResult {
   374    required Document document = 1;
   375    repeated Field expression = 4;
   376    repeated double score = 2;
   377    optional string cursor = 3;
   378  }
   379  
   380  message SearchResponse {
   381    repeated SearchResult result = 1;
   382    required int64 matched_count = 2;
   383    required RequestStatus status = 3;
   384    optional string cursor = 4;
   385    repeated FacetResult facet_result = 5;
   386  
   387    extensions 1000 to 9999;
   388  }