Shows the score curves when given different settings for the three types of scoring functions available in Elasticsearch.
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
-- Table for raw NGINX logs | |
CREATE EXTERNAL TABLE IF NOT EXISTS `raw_nginx_logs` ( | |
`remote_addr` string, | |
`remote_user` string, | |
`time_local` string, | |
`http_verb` string, | |
`url` string, | |
`http_ver` string, | |
`status` int, | |
`body_bytes_sent` int, |
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
#!/usr/bin/env python | |
import argparse | |
import json | |
import random | |
import sys | |
def get_topic( args, data ): | |
topic = data['partitions'][0]['topic'] | |
for partition in data['partitions']: |
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": { | |
"function_score": { | |
"query": { | |
"multi_match": { | |
"query": "...", | |
"fields": [ | |
"title", "content", "author", | |
"tag.name", "category.name" | |
], |