Skip to content

Instantly share code, notes, and snippets.

{
"query": {
"bool": {
"must": {
"match": {
"title": {
"query": "mystery"
}
}
},
{
"stories": {
"mappings": {
"story": {
"properties": {
"description": {
"type": "string"
},
"title": {
"type": "string"
action datetime query document
query 2016-06-09 11:04:01 the necromancer
click 2016-06-09 11:04:23 the necromancer 56534248
{
"query": {
"bool": {
"must": {
"match": {
"title": {
"query": "The Necromancer"
}
}
},
{
"stories": {
"mappings": {
"story": {
"properties": {
"description": {
"type": "string"
},
"title": {
"type": "string"

Keybase proof

I hereby claim:

  • I am akdh on github.
  • I am akdh (https://keybase.io/akdh) on keybase.
  • I have a public key ASDNjqhZzsWBYcg6CJ5ZdFsmONimsv8u3EBnrIUAYjWd5wo

To claim this, I am signing this object:

@akdh
akdh / to_qrel.py
Created August 20, 2015 17:12
Converts custom CSV to qrel format
import csv
import sys
VOTE_THRESHOLD = 2
topics = {}
next_topic = 900
for row in csv.reader(sys.stdin):
if row[1] == 'blah':
@akdh
akdh / README.md
Last active August 29, 2015 14:20
@akdh
akdh / README.md
Last active September 8, 2015 23:12
Validation testing instructions for suggestion services.

Test your service

See https://github.com/akdh/cst-tools for JSON schemas.

Assuming your service callback URL is http://127.0.0.1:5002/suggestions, you can make a request to your service and ensure that it is valid using the following commands:

curl -H "Content-Type: application/json" --data @request.json -XPOST http://127.0.0.1:5002/suggestions > response.json
python validate.py data.json 192

No errors should be produced.

import sys
import warc
import json
if len(sys.argv) != 2:
print("usage: %s FILENAME" % sys.argv[0])
exit()
filename = sys.argv[1]