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 /line_aggs | |
# create index and mapping | |
PUT /line_aggs | |
{ | |
"settings": { | |
"number_of_shards": 2, | |
"number_of_replicas": 0 | |
}, | |
"mappings": { |
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 index | |
DELETE /pref_aggs | |
# create index | |
PUT /pref_aggs | |
{ | |
"settings": { | |
"number_of_shards": 2 | |
}, | |
"mappings": { |
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 /bookstore | |
PUT /bookstore | |
POST /bookstore/books/_mapping | |
{ | |
"books" : { | |
"properties": { | |
"book" : { | |
"type": "nested", |
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
{ | |
"took": 3, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": 1, |
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 class TermFreqQuerySample { | |
public static void main(String... args){ | |
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name","test-es-cluster").build(); | |
Client client = new TransportClient(settings) | |
.addTransportAddress(new InetSocketTransportAddress("192.168.30.114",9300)); | |
QueryBuilder query = QueryBuilders.queryString("java") | |
.defaultField("text"); |
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
######## Marvel ########## | |
marvel.agent.enabled: false |
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/wildcard_sample" | |
curl -XPOST "http://localhost:9200/wildcard_sample/users/_mapping" -d' | |
{ | |
"users": { | |
"properties": { | |
"User_Name": { | |
"type": "multi_field", | |
"fields": { | |
"User_Name": { |
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
<fieldType name="text_ja_synonym" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="false"> | |
<analyzer> | |
<tokenizer class="solr.JapaneseTokenizerFactory" mode="search" /> | |
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true" tokenizerFactory="solr.JapaneseTokenizerFactory"/> | |
</analyzer> | |
</fieldType> |
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
## Versions of Major Components | |
* Apache Tika 1.4 | |
* Carrot2 3.8.0 | |
* Velocity 1.7 and Velocity Tools 2.0 | |
* Apache UIMA 2.3.1 | |
* Apache ZooKeeper 3.4.5 | |
## Upgrading from Solr 4.5.0 |
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
# create index | |
curl -XPUT "http://localhost:9200/restful" | |
# post mapping | |
curl -XPOST "http://localhost:9200/restful/events/_mapping" -d' | |
{ | |
"events" : { | |
"dynamic_templates" : [ { | |
"template_string" : { | |
"mapping" : { |