Skip to content

Instantly share code, notes, and snippets.

View siddharthlatest's full-sized avatar

Siddharth Kothari siddharthlatest

View GitHub Profile
[
{
"album": "The White Stripes",
"year": 1999,
"US_peak_chart_post": "-"
},
{
"album": "De Stijl",
"year": 2000,
"US_peak_chart_post": "-"
{
"took": 35,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 211,
{
"took": 3,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 2,
{
sensorId: "SingleListFilter",
appbaseField: "db.field",
showSearch: {true}
}
@siddharthlatest
siddharthlatest / GET _search.js
Last active December 26, 2016 20:59
_search action
{
"query" : {
"bool" : {
"filter" : {
"term" : {
"city" : "London"
}
}
}
},
@siddharthlatest
siddharthlatest / aggregations.md
Created November 14, 2016 07:29
Aggregations

Aggregations

Run on mirage_test

1. Metrics Aggregations

1.1 Avg Aggregation

Single-value metrics aggregation that computes the average of numeric values that are extracted from the aggregated documents.

var React = require('react');
var UserImg = React.createClass({
componentDidMount: function() {
var self = this;
this.img = new Image();
var defaultSrc = 'http://www.avidog.com/wp-content/uploads/2015/01/BellaHead082712_11-50x65.jpg';
this.img.onerror = function() {
if (self.isMounted()) {
self.setState({
var React = require('react');
var UserImg = require('./userImg.jsx');
//User component
var User = React.createClass({
HIGHLIGHT_TAGS: function(group_topics) {
var highlight_tags = [];
var group_topics = group_topics;
var highlight = this.props.TOPIC_LIST;
var React = require('react');
var Tag = require('./tag.jsx');
var FilterContainer = React.createClass({
componentWillMount: function() {
this.fire_response();
},
fire_response: function() {
var $this = this;
streamingClient = REQUEST.GET_STREAMING_CLIENT();
@siddharthlatest
siddharthlatest / Container.jsx
Created May 31, 2016 20:30
Main container file
var React = require('react');
var FilterContainer = require('./filterContainer.jsx');
var User = require('./User.jsx');
var Container = React.createClass({
getInitialState: function() {
return {
users: [],
CITY_LIST: [],
TOPIC_LIST: []