Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Header search API

Katharina Sabel edited this page May 11, 2015 · 1 revision

In this wiki document I want to explain how to search the headers of a reedb vault file. Headers are cached in dictionaries when files are read. Thus they probably don't contain (too) sensitive or vital information.

They are important when dealing with people though. Headers can be used to build file lists, search for URLs or tags and just generally give users a quick and responsive experience in your application.

Search Queuery building

A search queuery can either be passed into an active vault via the HTTP interface or as a local gem dependency. They generally have this format:

tags=search, internet#urls=www.poodle.com

The fields "tags" and "urls" have to correspond to header fields in the vault (you can get those via the config interface). Afterwards you provide items after a '=', all separated with a comma. Please avoid padding your requests in more spaces as it slows down parsing and can cause errors.

Other fields can be chain-addressed via '#' chaining.

This request, for example, would search for files that had the tags 'search', 'internet' and the url 'www.poodle.com' (HTTP:// etc. will be stripped away from the vault for search)

Clone this wiki locally