This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef WIN32_NO_STATUS | |
| # define WIN32_NO_STATUS | |
| #endif | |
| #include <windows.h> | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <winerror.h> | |
| #include <winternl.h> | |
| #include <stddef.h> | |
| #include <winnt.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'tire' | |
| Tire.configure { logger 'elasticsearch.log', :level => 'debug' } | |
| class Document | |
| attr_accessor :title, :content | |
| include Tire::Model::Persistence | |
| include Tire::Model::Search | |
| include Tire::Model::Callbacks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -s -XPOST localhost:9200/_bulk?pretty=true --data-binary ' | |
| { "index" : { "_index" : "parent_child", "_type" : "store", "_id" : "store1" } } | |
| { "name" : "auchan", "owner" : "chris" } | |
| { "index" : { "_index" : "parent_child", "_type" : "department", "_id" : "department1", "parent" : "store1" } } | |
| { "name" : "toys", "numberOfProducts" : 150 } | |
| { "index" : { "_index" : "parent_child", "_type" : "product", "_id" : "product1", "parent" : "department1", "routing" : "store1" } } | |
| { "name" : "gun", "trademark" : "tiger", "price" : 9, "store_id" : "store1" } | |
| ' |