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
# custom token filter settings | |
index: | |
analysis: | |
filter: | |
myFilter: | |
type: eg.MyTokenFilterFactory | |
param1: value1 | |
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: | |
default: | |
tokenizer : standard | |
filter : [standard, lowercase, stop, asciifolding] |
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
{ | |
"discovery" : { | |
"zen" : { | |
"ping.unicast.hosts" : [ | |
"host1:9300", | |
"host2:9300", | |
"host3:9300" | |
] | |
} | |
} |
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
public static void main(String[] args) { | |
List<Node> nodes = new ArrayList<Node>(); | |
for (int i = 0; i < 4; i++) { | |
nodes.add(NodeBuilder.nodeBuilder().node()); | |
} | |
Node client = NodeBuilder.nodeBuilder().client(true).node(); | |
CreateIndexResponse createIndexResponse = client.client().admin().indices().prepareCreate("test").execute().actionGet(); | |
System.out.println("created index, ack = " + createIndexResponse.acknowledged()); |
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
SearchResponse searchResponse = client.prepareSearch() | |
.setQuery(matchAllQuery()) | |
.setSize(35) | |
.setScroll(TimeValue.timeValueMinutes(2)) | |
.addSort("field", SortOrder.ASC) | |
.execute().actionGet(); | |
assertThat(searchResponse.hits().getTotalHits(), equalTo(100l)); | |
assertThat(searchResponse.hits().hits().length, equalTo(35)); |
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
if (!groups.isEmpty()) { | |
// lets see if we can filter based on groups | |
boolean filter = true; | |
for (String group : reservation.getGroupNames()) { | |
if (groups.contains(group)) { | |
filter = false; | |
break; | |
} | |
} | |
if (filter) { |
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
/** | |
* An upgrade script from FS gateway indices version 0.9.0 to 0.10. | |
* | |
* The script uses groovy, you can get it from here: http://groovy.codehaus.org/Download. | |
* | |
* Upgrade Process: | |
* | |
* 1. Stop indexing operations against the cluster. | |
* 2. Issue a flush command: curl -XPOST host:port/_flush | |
* 3. Issue a snapshot command: curl -XPOST host:port/_gateway/snapshot |
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
{ | |
"query" : { | |
"more_like_this" : { | |
"fields" : ["content", "title"], | |
"like_text" : "jetblue blew tire", | |
"min_term_freq" : 1 | |
} | |
}, | |
"from" : 2000 | |
} |
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
libtool: Version mismatch error. This is libtool 2.2.4, but the | |
libtool: definition of this LT_INIT comes from libtool 2.2.6b. | |
libtool: You should recreate aclocal.m4 with macros from libtool 2.2.4 | |
libtool: and run autoconf again. | |
make[3]: *** [thrift] Error 63 | |
make[2]: *** [all] Error 2 | |
make[1]: *** [all-recursive] Error 1 | |
make: *** [all] Error 2 |
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: | |
number_of_shards: 2 | |
number_of_replicas: 2 |
OlderNewer