Jump to: navigation, search

MetadataSearch

Revision as of 22:04, 9 November 2013 by Briancline (talk | contribs) (Fleshed out part of design summit content)

Proposed Metadata Search API

This document is a work in progress used to define the proposed API for searching account, container, and object metadata in Swift/Object Storage. It was discussed in a design summit session on 7 November 2013 at the Ice House summit in Hong Kong.

Etherpad: https://etherpad.openstack.org/p/icehouse-swift-metadata-search

  1. Search API Version
  • Extends base Swift API
  • Doesn't affect existing base request handling
  • Search API Version independent of base API version, e.g.:
   GET /<object storage API version>[/<account>[/<container>[/<object>]]]?<search API version>/...


  1. Scope can identify:
  • An object (unlikely to be used): `/acct1/cont2/obj3`
  • A container (and all of its objects): `/acct1/cont2`
  • An account (and all of its containers and objects): `/acct1`
  • The entire object store (across all accounts): `[/]`


  1. Search criteria
   [&query=[(]<query expr1>[ [AND|OR] <query expr2>][)][ [AND|OR]...] ]

...where:

   query expr=<query attr><operator><query value>

...and `<operator>` is one of:

   =, !=, <, <=, >, >=, ~
  • Note: Generating SQL query for complex boolean expressions across multiple tables may be complex! (If using SQL)
  • Simpler: support only AND (multiple ANDs OK)
  • Services request shows whether simple (ANDs only) or complex supported
    1. Searching across accounts
    1. "Authorized Searchers" feature
    1. Search live and recently deleted items
  1. List of attributes to return
    1. Complete URI structure
  1. Filter parameters
  1. Output format parameters