Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
import sys
from twisted.words.xish import domish
def handleStart(elem):
#print 'START: %r' % elem.toXml()
pass
mayo:~ curl -s "http://localhost:5984/cl-test/_fti/_design/search/by-body/?q=body:weather&debug=true&include_docs=true&sort=date_obj<date>" | json_reformat
{
"q": "body:weather",
"plan": "TermQuery(body:weather,boost=1.0)",
"etag": "121418c19bb3ca",
"skip": 0,
"limit": 25,
"total_rows": 2,
"search_duration": 0,
"fetch_duration": 40,
# installs couchdb-lucene (http://github.com/rnewson/couchdb-lucene)
include_recipe "couchdb"
version = node[:couchdb][:lucene][:version]
file = "couchdb-lucene-#{version}-dist.tar.gz"
install_dir = "/opt/couchdb-lucene-#{version}"
# Install couchdb-lucene
script "install_couchdb-lucene" do
mayo:~ curl http://localhost:5985
{"couchdb-lucene":"Welcome","version":"0.5.5"}
mayo:~/src/couchdb-lucene((v0.5.5)) mvn
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'assembly'.
[INFO] ------------------------------------------------------------------------
[INFO] Building CouchDB Lucene
[INFO] task-segment: [assembly:assembly] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] Preparing assembly:assembly
[INFO] ------------------------------------------------------------------------
[INFO] Building CouchDB Lucene
function(doc) {
var d = new Date("2010-08-13");
emit(d.getTime(), doc._id);
}
Document creation:
ret.add(doc.date, {
"field": "date_str"
});
Request: ?limit=50&skip=0&stale=ok&sort=\date_str&include_docs=true&q=group<int>:2
Response's sort_order:
Array
@powdahound
powdahound / gist:519916
Created August 11, 2010 22:33
Error starting couchdb after upgrading from 0.10.2 to 0.11.2.
[Wed, 11 Aug 2010 22:28:49 GMT] [error] [<0.90.0>] {error_report,<0.29.0>,
{<0.90.0>,crash_report,
[[{pid,<0.90.0>},
{registered_name,couch_stats_aggregator},
{error_info,{exit,{{badmatch,{error,enoent}},
[{couch_stats_aggregator,init,1},
{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]},
[{gen_server,init_it,6},
{proc_lib,init_p_do_apply,3}]}},
#!/bin/bash
MYSQL_HOST=graphs.cao0umbvcdjq.us-east-1.rds.amazonaws.com
MYSQL_USER=graphs
MYSQL_PASS=graphs
MYSQL_DB=testdb
MYSQL_CLIENT="mysql -h $MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB"
# create table
#
# Author:: David Abdemoulaie <opscode@hobodave.com>
# Cookbook Name:: chef
# Attributes:: server_proxy
#
# Copyright 2009, David Abdemoulaie
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at