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
package com.klm.mysearch; | |
import org.apache.lucene.analysis.CharArraySet; | |
import org.apache.lucene.analysis.TokenStream; | |
import org.apache.lucene.analysis.compound.HyphenationCompoundWordTokenFilter; | |
import org.apache.lucene.analysis.compound.hyphenation.Hyphenation; | |
import org.apache.lucene.analysis.compound.hyphenation.HyphenationTree; | |
import org.apache.lucene.analysis.standard.StandardTokenizer; | |
import org.junit.Ignore; | |
import org.slf4j.Logger; |
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
# >>> conda init >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$(CONDA_REPORT_ERRORS=false '/Users/jettrocoenradie/Development/anaconda/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "/Users/jettrocoenradie/Development/anaconda/anaconda3/etc/profile.d/conda.sh" ]; then | |
. "/Users/jettrocoenradie/Development/anaconda/anaconda3/etc/profile.d/conda.sh" | |
CONDA_CHANGEPS1=false conda activate base | |
else |
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 -XGET "http://localhost:9200/signalmedia/_search" -H 'Content-Type: application/json' -d' | |
{ | |
"query": { | |
"match": { | |
"content": "rain" | |
} | |
}, | |
"aggs": { | |
"my_sampler": { | |
"sampler": { |
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 bash | |
curl "localhost:9200/crowdcontrol/_search?pretty&search_type=count" -d '{ | |
"query": { | |
"term": {"roomId":"foyer"} | |
}, | |
"aggs": { | |
"byRoom": { | |
"terms": { | |
"field":"roomId" |
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 -XDELETE "http://localhost:9200/test_max_expansions" | |
curl -XPUT 'http://localhost:9200/test_max_expansions' -d ' | |
{ | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 1 | |
}, | |
"mappings": { | |
"posts" : { |
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
package wsapp; | |
import org.apache.catalina.websocket.MessageInbound; | |
import org.apache.catalina.websocket.WsOutbound; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
import java.nio.CharBuffer; | |
/** |