Skip to content

Instantly share code, notes, and snippets.

View iladriano's full-sized avatar
👓
I may be slow to respond.

Adri Fernandez iladriano

👓
I may be slow to respond.
  • Sunnyvale
View GitHub Profile
@francois2metz
francois2metz / indextank.js
Created June 13, 2011 16:48
indextank with Node and Spore
// mkdir indextank
// wget https://github.com/SPORE/api-description/blob/master/services/indextank.json
// install node and npm
// npm install spore underscore futures
// edit baseUrl, password and index var
// node indextank.js
var baseUrl = 'http://xxx.api.indextank.com';
var password = 'xxx';
var index = 'test_spore';
@iladriano
iladriano / gist:757969
Created December 29, 2010 00:42
test docvar_filters
require 'rubygems'
require 'indextank'
api_client = IndexTank::Client.new 'api url'
index = api_client.indexes 'eurotrip'
index.document('post4').add({ :text => '4I need my Duke.4'}, :variables => { 0 => 1, 1 => 4 })
index.document('post5').add({ :text => '5Duke Nukem is awesome.5'}, :variables => { 0 => 2, 1 => 5 })
index.document('post6').add({ :text => '6People who love Duke Nukem6'}, :variables => { 0 => 3, 1 => 6 })
index.search('Duke')
index.document('post4').add({ :text => '4I need my Duke. 4'}, :variables => { 0 => 1, 1 => 4 })
index.search('Duke')