Skip to content

Instantly share code, notes, and snippets.

@lukeforehand
lukeforehand / gist:9236cecc835ad7c9e9ac
Created December 6, 2015 19:57
elasticsearch-native-script-failure
[2015-12-06 19:55:07,377][DEBUG][action.search.type ] [Steel Serpent] [patent][1], node[uuxmN4tkRgqIbK0R3CxJ3w], [P], v[2], s[STARTED], a[id=fQ6mF4mlQYSx2jxUDCFsyA]: Failed to execute [org.elasticsearch.action.search.SearchRequest@66e55c3b] lastShard [true]
RemoteTransportException[[Steel Serpent][172.17.0.2:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"_source":{"exclude":["abstractLen","citationLen","claimLen","descriptLen","titleLen"],"include":[]},"size":15,"from":0,"query":{"function_score":{"boost_mode":"replace","filter":{"bool":{"must":[{"range":{"priorityDate":{"gte":"1970","lte":"2015","format":"yyyy-MM-dd||yyyy"}}},{"terms":{"execution":"bool","_cache":false,"_all":["bottled","wine","beverages","drinks"]}}]}},"functions":[{"script_score":{"script":{"id":"expandquery_score","params":{"fields":["abstract","descript","claim","title"],"terms":["bottled","wine"],"synonyms":{"beverages":0.06666667,"drinks":0.06666667}}}}}]}}}]]; nested:
@lukeforehand
lukeforehand / google-patent-link-investigation.md
Created October 31, 2015 16:24
google-patent-link-investigation
[
{ "name": "author_id", "type": "STRING", "mode": "REQUIRED" },
{ "name": "interest_dataview_7d", "type": "RECORD", "mode": "REPEATED",
"fields": [
{ "name": "key", "type": "STRING", "mode": "REQUIRED" },
{ "name": "value", "type": "INTEGER", "mode": "REQUIRED" }
]
},
{ "name": "interest_dataview_30d", "type": "RECORD", "mode": "REPEATED",
"fields": [
package com.ni
import org.apache.hadoop.hbase.client.ConnectionFactory
import org.apache.hadoop.hbase.{HBaseConfiguration, TableName}
import org.apache.spark.{SparkConf, SparkContext}
/**
* Created by lforehand on 8/6/15.
*/
object LoadHbaseUsers {
SELECT COUNT(*) AS kount, feed_schema, DATE(JSON_EXTRACT_SCALAR(json, '$.ni.authored_date')) AS authored_date
FROM [raw.gnip_wordpressorg_post_20150724@1437361200063-1437447600107],[raw.gnip_wordpressorg_post_20150723@1437361200063-1437447600107],[raw.gnip_wordpressorg_post_20150722@1437361200063-1437447600107],[raw.boardreader_youtube_comment_20150710@1437361200063-1437447600107],[raw.gnip_wordpressorg_post_20150721@1437361200063-1437447600107],[raw.boardreader_youtube_comment_20150711@1437361200063-1437447600107],[raw.gnip_wordpressorg_post_20150720@1437361200063-1437447600107],[raw.boardreader_youtube_comment_20150712@1437361200063-1437447600107],[raw.boardreader_youtube_comment_20150713@1437361200063-1437447600107],[raw.gnip_wordpresscom_comment_20150709@1437361200063-1437447600107],[raw.boardreader_youtube_comment_20150714@1437361200063-1437447600107],[raw.boardreader_youtube_comment_20150715@1437361200063-1437447600107],[raw.boardreader_review_20150708@1437361200063-1437447600107],[raw.boardreader_revie
2015-07-08 22:14:48 c.n.s.b.g.BigqueryStreamBolt [INFO] -------------- REQUEST --------------
POST https://www.googleapis.com/batch
Accept-Encoding: gzip
User-Agent: Google-HTTP-Java-Client/1.20.0 (gzip)
Content-Type: multipart/mixed; boundary=__END_OF_PART__
Content-Length: 4581
2015-07-08 22:14:48 c.n.s.b.g.BigqueryStreamBolt [INFO] curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'User-Agent: Google-HTTP-Java-Client/1.20.0 (gzip)' -H 'Content-Type: multipart/mixed; boundary=__END_OF_PART__' -d '@-' -- 'https://www.googleapis.com/batch' << $$$
2015-07-08 22:14:48 c.n.s.b.g.BigqueryStreamBolt [INFO] Total: 4,581 bytes
2015-07-08 22:14:48 c.n.s.b.g.BigqueryStreamBolt [INFO] --__END_OF_PART__
@lukeforehand
lukeforehand / gist:add8af6ddd4c6c1cbba9
Created March 30, 2015 16:02
specs docker java brew os
Specs:
specs 0.15
https://github.com/mcandre/specs#readme
docker version
/Library/Ruby/Gems/2.0.0/gems/specs-0.15/lib/specs.rb:250: warning: Insecure world writable dir /Users/luke/Documents/workspace in PATH, mode 040777
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
### Keybase proof
I hereby claim:
* I am lukeforehand on github.
* I am lukeforehand (https://keybase.io/lukeforehand) on keybase.
* I have a public key whose fingerprint is 116C F144 1B53 2DEB B151 C32F D7A8 DA31 B634 5816
To claim this, I am signing this object:
cat /etc/elasticsearch/mappings/_default/default.json
{
   "default" : {
       "dynamic_templates" : [
           {
               "template_1" : {
                   "match" : "*",
                   "match_mapping_type" : "string",
                   "mapping" : {
[2011-08-17 16:59:51,293][INFO ][cluster.metadata         ] [Agony] [post_1970_01] update_mapping [POST] (dynamic)
[2011-08-17 16:59:51,295][INFO ][cluster.metadata         ] [Agony] [post_2009_36] update_mapping [POST] (dynamic)
[2011-08-17 16:59:51,298][INFO ][cluster.metadata         ] [Agony] [post_2009_31] update_mapping [POST] (dynamic)
[2011-08-17 16:59:51,301][INFO ][cluster.metadata         ] [Agony] [post_2011_31] update_mapping [POST] (dynamic)
[2011-08-17 16:59:53,644][INFO ][cluster.metadata         ] [Agony] [post_2011_21] creating index, cause [auto(bulk api)], shards [4]/[1], mappings [default, POST]
[2011-08-17 16:59:53,699][INFO ][cluster.metadata         ] [Agony] [post_2011_12] creating index, cause [auto(bulk api)], shards [4]/[1], mappings [default, POST]
[2011-08-17 16:59:53,756][INFO ][cluster.metadata         ] [Agony] [post_2009_28] creating index, cause [auto(bulk api)], shards [4]/[1], mappings [default, POST]
[2011-08-17 16:59:53,812][INFO ][cluster.metadata         ] [Agony] [pos