This file contains 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
{ | |
"query" : { | |
"filtered" : { | |
"query" : { | |
"custom_score" : { | |
"query" : { | |
"nested" : { | |
"path" : "path1", | |
"query" : { | |
"flt" : { |
This file contains 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
"query" : { | |
"filtered" : { | |
"query" : { | |
"custom_score" : { | |
"query" : { | |
"nested" : { | |
"path" : "expertises", "query" : { | |
"flt" : { | |
"fields" : ["expertises.subject_name"], "like_text : args[0] | |
} |
This file contains 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
[2011-09-07 16:52:50,340][DEBUG][action.search.type ] [Nate Grey] [36] Failed to execute fetch phase | |
java.lang.IllegalArgumentException | |
at java.nio.Buffer.limit(Buffer.java:249) | |
at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:123) | |
at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:213) | |
at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39) | |
at org.apache.lucene.store.DataInput.readInt(DataInput.java:84) | |
at org.apache.lucene.store.BufferedIndexInput.readInt(BufferedIndexInput.java:153) | |
at org.apache.lucene.store.DataInput.readLong(DataInput.java:126) | |
at org.apache.lucene.store.BufferedIndexInput.readLong(BufferedIndexInput.java:166) |
This file contains 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
tp_hash = param1['properties']; | |
vouches = _source.vouches; | |
a = 0; | |
b = 0; | |
c = 0; | |
d = 0; | |
e = 0; | |
f = 0; |
This file contains 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
{ | |
"thistype" : { | |
"_routing" : { | |
"required" : true | |
}, | |
"properties" : { | |
"open_requests" : { | |
"type" : "long" | |
} | |
}, |
This file contains 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 -XPUT 'http://localhost:9200/testings/' -d '{ | |
"index" : { | |
"number_of_shards" : 1 | |
} | |
}' | |
curl -XPUT 'http://localhost:9200/testings/testing/_mapping' -d '{ | |
"testing" : { | |
"properties" : { |
This file contains 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
Parent document mapping | |
{ | |
"parent" : { | |
"properties" : { | |
"headline" : { | |
"type" : "string" | |
}, | |
"doc_score" : { | |
"type" : "long" |
This file contains 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
a = 5 | |
b = 10 | |
c = 9 | |
#using nested function | |
callback = (b,c) -> | |
return (err, doc) -> | |
console.log "B and C are available here" |
This file contains 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
#connectDb.coffee | |
module.exports = (mongoString) -> | |
mongoose = require 'mongoose' | |
db = mongoose.createConnection mongoString | |
return db | |
#dbConfig.coffee | |
module.exports = (mongoInstance) -> | |
models = {} |
This file contains 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
app.get "/api/*", routes.proxy.get | |
routes.proxy.get = (req, res) -> | |
qIndex = req.url.indexOf("?") | |
queryString = req.url.substr(qIndex) | |
options = | |
host: 127.0.0.1 | |
path: req.path + queryString | |
port: 8000 | |
headers: req.headers |