Skip to content

Instantly share code, notes, and snippets.

View markjhoy's full-sized avatar

Mark J. Hoy markjhoy

View GitHub Profile
@markjhoy
markjhoy / workplace-search-top_queries_no_clicks
Last active January 24, 2021 17:56
Elastic Workplace Search - Vega Configuration for Top Queries With No Clicks
{
$schema: https://vega.github.io/schema/vega-lite/v4.json
title: Top Queries With No Clicks
data: {
url: {
index: .ent-search-workplace-search-analytics-ecs-ilm-logs-*
body: {
query: {
bool: {
@markjhoy
markjhoy / WorkplaceSearch_Analytics_Transform.json
Created January 24, 2021 20:10
Workplace Search - Analytics - Query Stats Transform
{
"source": {
"index": ".ent-search-workplace-search-analytics-ecs-ilm-logs-*"
},
"dest": {
"index": "workplace-search-analytics_query-stats"
},
"pivot": {
"group_by": {
"query_id": {
@markjhoy
markjhoy / Weekly User Retention
Created January 26, 2021 15:27
Workplace Search Analytics - Weekly User Retention
{
"size": 0,
"query": {
"bool": {
"minimum_should_match": 1,
"should": [
{ "match": { "event.action": "SearchMetrics.query" } }
]
}
},
@markjhoy
markjhoy / Monthly Engagement Volume
Created January 26, 2021 15:36
Workplace Search Analytics - Monthly Engagement Volume
{
"size": 0,
"query": {
"bool": {
"minimum_should_match": 1,
"should": [
{
"match": {
"event.action": "SearchMetrics.query"
}
@markjhoy
markjhoy / Workplace Search Analytics Dashboard.ndjson
Created February 1, 2021 23:17
Workplace Search Analytics Kibana Dashboard
{"attributes":{"fields":"[{\"count\":0,\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"SearchMetrics.click.result.content_source\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"SearchMetrics.click.result.document_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"SearchMetrics.click.result.id\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"SearchMetrics.click.result.rank\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"SearchMetrics.click.r
@markjhoy
markjhoy / gist:2cda82c598df69dbee7aac947da56996
Created August 24, 2023 12:17
Sample Ruby Letter Arrays
['a','b','c'],
['d','e','f'],
['g','h','i'],
['j','k','l'],
['m','n','o'],
['p','q','r','s'],
['t','u','v'],
['w','x','y','z']
@markjhoy
markjhoy / gist:e22d3b3456d0ac4133685c013aa3f767
Last active September 7, 2023 15:41
Read Text from URL in Java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class DictionaryLoader {
public static List<String> loadDictionaryFromUrl() {