Skip to content

Instantly share code, notes, and snippets.

@rickthomasjr
rickthomasjr / question_step.json
Last active January 4, 2016 01:08
Here's a sample of a step with a question, a text entry, and an image entry.
{
"previous_answers": [],
"next_step": {
"_id": "52debaa6acf26245d6000001",
"title": "Patio size",
"context": "step",
"uuid": "8d2cdfc6-ceea-413f-b4f8-a3bebfdb1d5b",
"left": "234px",
"top": "225px",
"result_groups": [
@rickthomasjr
rickthomasjr / gist:2762728
Created May 21, 2012 14:48 — forked from anonymous/gist:2762718
can't convert Symbol into Integer
xml.ItemAttributeImportCollection do
item['ItemAttributeImportCollection']['ItemAttributeImport'].each do |attribute|
puts attribute
xml.ItemAttributeImport do
xml.AttributeName attribute["AttributeName"]
xml.AttributeValue attribute["AttributeValue"]
end
end
@rickthomasjr
rickthomasjr / settings.json
Created February 13, 2012 20:37 — forked from dctrwatson/settings.json
multiple ElasticSearch analyzers
{
"settings": {
"analysis": {
"analyzer": {
"uax_url": {
"type": "custom",
"tokenizer": "uax_url_email",
"filter": ["standard", "lowercase", "stop"]
},
"uax_url_strip_html": {
@rickthomasjr
rickthomasjr / facet_test
Created February 8, 2012 20:40
Faceting with commas and extra spaces
curl -XDELETE 'http://127.0.0.1:9200/foo/?pretty=1'
curl -XPUT 'http://127.0.0.1:9200/foo/?pretty=1' -d '
{
"settings" : {
"analysis" : {
"analyzer" : {
"comma" : {
"pattern" : "\\s*,\\s*",
"type" : "pattern"