Skip to content
Jesse White edited this page May 19, 2015 · 1 revision

Search

If so enabled, Newts can perform search indexing of resources and metrics name.

Indexing

Irrespective of API, resources are objects with a string id member, and an associate array called attributes.

{
  'id' : 'web.example.com:traffic:eth0',
  'attributes' : { 'platform': 'linux', 'category': 'server' }
}

During the indexing process, Newts will tokenize the id member by splitting on the colon character (:), and index the resulting sequence. Additionally, each of the key/value pairs of attributes are indexed as individual terms.

Searching

Newts implements a subset of the Lucene Query Syntax. At the time of this writing, that subset is as follows:

Fields

When performing a search, you can specify a field or use the default (catch-all). When specifying the field name, separate it from the term value using a colon (:). For example:

platform:windows

Boolean Operators

OR

Example:

platform:windows OR server

AND

Example:

platform:windows AND server

Grouped Terms

Query terms can be grouped together with parenthesis and used in conjunction with boolean operators.

Example:

platform:windows AND (memory:large OR cpu:large)
Clone this wiki locally