A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://gist.github.com/mattweber below:

Website Navigation


mattweber’s gists · GitHub

Instantly share code, notes, and snippets.

This file contains hidden or 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 co.webertech.search; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_REPLICAS; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertHitCount; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse; import static org.hamcrest.core.Is.is; import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse;

I hereby claim:

To claim this, I am signing this object:

This file contains hidden or 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 # delete old index if exists curl -XDELETE 'http://localhost:9200/syns?pretty' # create index with synonym analyzer and mapping curl -XPUT 'http://localhost:9200/syns?pretty' -d '{ "settings" : { "number_of_replicas": 0, "number_of_shards": 1, "index": { "analysis": { This file contains hidden or 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 Use extractDocs.py to parse and index the StackOverflow posts.xml file into an existing index. Usage: extractDocs.py [options] file Options: -h, --help show this help message and exit -s SERVER, --server=SERVER ElasticSearch Server -i INDEX, --index=INDEX Index name to use This file contains hidden or 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 This is an example how to perform multi-select faceting in ElasticSearch. Selecting multiple values from the same facet will result in an OR filter between each of the values: (facet1.value1 OR facet1.value2) Faceting on more than one facet will result in an AND filter between each facet: (facet1.value1 OR facet1.value2) AND (facet2.value1) I have chosen to update the counts for each facet the selected value DOES NOT belong to since we are performing an AND between each facet. I have included an example that shows how to keep the counts if you don't want to do this (filter0.sh). This file contains hidden or 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 ## For comment on ## http://www.romseysoftware.co.uk/2012/02/20/not-within-queries-lucene ## { "query":{ "span_not":{ "include": { "span_term": {"FIELD":"fish"} }, This file contains hidden or 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/test/_search?pretty=true' -d '{ "query":{ "bool":{ "should": [ { "constant_score":{ "filter" : { "query":{ "query_string":{ "query":"findme", This file contains hidden or 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 -XPUT 'http://localhost:9200/testing' -d '{ "mappings" : { "testa" : { "_source" : { "enabled" : true }, "properties" : { "field1" : {"type" : "string", "store" : "yes"}, "field2" : {"type" : "string", "store" : "yes"} } This file contains hidden or 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 index: analysis: analyzer: string_lowercase: tokenizer: keyword filter: lowercase

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4