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
| # An example of using ngram analysis in ElasticSearch with the Tire rubygem | |
| # ========================================================================== | |
| # The original, raw example: https://gist.github.com/988923 | |
| require 'rubygems' | |
| require 'tire' | |
| require 'yajl/json_gem' | |
| class URL | |
| def initialize(attributes={}) |
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
| RailsRoot = File.expand_path "#{File.dirname __FILE__}/.." | |
| PidsDir = "#{RailsRoot}/tmp/pids" | |
| ListenAddress = "127.0.0.1" | |
| ListenPort = 50000 | |
| UnixListen = "tmp/unicorn.sock" | |
| Backlog = 2048 | |
| Workers = 10 | |
| Timeout = 30 |
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
| package main | |
| // This is a basic example of running an nsqd instance embedded. It creates | |
| // and runs an nsqd with all of the default options, and then produces | |
| // and consumes a single message. You are probably better off running a | |
| // standalone instance, but embedding it can simpllify deployment. | |
| // See https://github.com/bitly/nsq/blob/master/nsqd/options.go and | |
| // https://github.com/bitly/nsq/blob/master/apps/nsqd/nsqd.go for | |
| // more details on how to configure an embedded nsqd instance. |
OlderNewer