Skip to content

Instantly share code, notes, and snippets.

View alexbrasetvik's full-sized avatar

Alex Brasetvik alexbrasetvik

View GitHub Profile
text:
- Michael
- Heaney
- Heavey
analyzer:
metaphone:
type: custom
tokenizer: standard
_type: document
_id: 1
title: Doc 1
---
_parent: 1
_type: acl
acls:
- accessMap:
- key: "Role:USER"
@alexbrasetvik
alexbrasetvik / documents.yaml
Created January 23, 2014 17:11
ACL example
_id: 1
acls:
- accessMap:
- key: "Role:USER"
allow:
- READ
- key: "Account:52d96bfada0695fcbdb41daf"
allow:
- READ
- UPDATE
_type: character
first_name: John
last_name: Snow
---
_type: character
first_name: Eddard
last_name: Stark
user: John Smith
email: john.smith@gmail.com
---
user: Alice Smith
email: john.smith@gmail.com
title: Female
---
title: Female specimen
---
title: Microscopic examination of specimen from female
_type: product
store: Apple Store
category: Computers
name: MacBook Pro
---
_type: product
store: Apple Store
# Some sample documents that could be data about ticket sales.
# An organization can have multiple events, and an event has ticket sales.
# Tickets can have different prices, and are of course sold at different times.
ticket_id: 1
event: red_wedding
organization: freys
sold_at: 2013-12-01T12:00
price: 400
---
@alexbrasetvik
alexbrasetvik / documents.yaml
Created December 20, 2013 11:30
Simple examples of aggregations on CPU metrics.
# Sample data points.
# These could e.g. be metrics reported by collectd to logstash.
host: app1
cpu: 87.0
---
host: app1
cpu: 1.23
---
host: app2