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
while(true){ | |
if(connection.isOpen()){ | |
logger.debug("MQ Connection is Opened"); | |
}else{ | |
logger.debug("MQ Connection is Closed"); | |
} | |
messageFromQueue = rabbitmqUtil.getMessageFromQueue(waitTime, connection, exchangeName, routekeyName); | |
logger.debug("messageFromQueue Obtained: "+messageFromQueue); | |
if(messageFromQueue == null){ | |
boolStatus = false; |
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
{"index" : { "_index" : "test", "_type" : "type1", "_id" : "3", "_analyzer":"myanalyzer" } } | |
{"type1" : { "name" : "my name is john" } } | |
{"myanalyzer" : {"type" : "custom", "tokenizer" :"mytokenizer","filter" :"myfilter"}} | |
{"mytokenizer": {"type":"whitespace"}} | |
{"myfilter":{"type":"stop" "stopwords" : [is]}} | |
{"create" : { "_index" : "test", "_type" : "type1", "_id" : "3" } } | |
{"type1" : { "name" : "my name is john" } } |
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
org.elasticsearch.common.jackson.JsonParseException: Unexpected character ('"' (code 34)): was expecting comma to separate OBJECT entries | |
at [Source: [B@1710808; line: 1, column: 296] | |
at org.elasticsearch.common.jackson.JsonParser._constructError(JsonParser.java:1291) | |
at org.elasticsearch.common.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385) | |
at org.elasticsearch.common.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306) | |
at org.elasticsearch.common.jackson.impl.Utf8StreamParser.nextToken(Utf8StreamParser.java:312) | |
at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:46) | |
at org.elasticsearch.action.bulk.BulkRequest.add(BulkRequest.java:121) | |
at org.elasticsearch.client.action.bulk.BulkRequestBuilder.add(BulkRequestBuilder.java:84) | |
at org.elasticsearch.river.rabbitmq.RabbitmqRiver$Consumer.run(RabbitmqRiver.java:216) |
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
{"index" : { "_index" : "test1", "_type" : "type1", "_id" : "1", "_analyzer":"myanalyzer" } } | |
{ "type1" : { "name" : "my name is john" } } | |
{ "myanalyzer" : {"type" : "custom", "tokenizer" :"whitespace","filter" :["myfilter1"]}} | |
{"myfilter1":{"type":"stop" "stopwords_path":"D:\resources\stopwords_eng.txt" ,"ignore_case":true}} | |
{"create" : { "_index" : "test1", "_type" : "type1", "_id" : "1" } } | |
{ "type1" : { "name" : "my name is john" } } |
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
{"index":{"analysis":{"analyzer":{"default":{"type":"custom","tokenizer":"whitespace","filter":["asciifolding","lowercase","stopwordfilter"],"filter":"{"stopwordfilter":{"type":"stop","stopwords_path":"D:\\RabbitmqRiverExample\\RabbitmqRiverExample\\resources\\stopwords_eng.txt","ignore_case":"true"}}"}}}}} |
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
try { | |
XContentBuilder stopwordfilter = null; | |
XContentBuilder indexSettings = null; | |
stopwordfilter=XContentFactory.jsonBuilder(); | |
stopwordfilter.startObject() | |
.startObject("stopwordfilter") | |
.field("type","stop") | |
.field("stopwords_path","F:\\resources\\stopwords_eng.txt") | |
.field("ignore_case","true") |
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
{ "index" : { "_index" :"idx_testtable", "_type" :"test_type", "_id" :"7"},{"analysis": {"analyzer":{"myindexanalyzer": {"type" :"custom","tokenizer": "whitespace","filter": ["lowercase", "customstopfilter", "asciifolding"]},"mysearchanalyzer": {"type" :"custom","tokenizer": "whitespace" }},{"filter":{"customstopfilter":{"type":"stop" ,"stopwords_path" :"F:\ElasticIndexManagementService\resources\stopwords_eng.txt" ,"ignore_case":true}}}}}} | |
{ "test_type" :{"index_analyzer" : "myindexanalyzer","search_analyzer" : "mysearchanalyzer"}} | |
{ "test_type" :{"id":7,"Description":" Technologies Inc"}} | |
{ "create" : { "_index" :"idx_testtable", "_type" :"test_type", "_id" :"7" }} | |
{ "test_type" :{"id":7,"Description":" Technologies Inc"}} |
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
{ | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"customindexanalyzer" : { | |
"type":"custom", | |
"tokenizer" : "whitespace", | |
"filter" : ["lowercase","asciifolding","length","mystopword"], | |
"char_filter" :["html_strip"] | |
}, |
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
{ | |
"index" : { | |
"analysis" : { | |
"analyzer" : { | |
"manualindexanalyzer" : { | |
"type":"custom", | |
"tokenizer" : "whitespace", | |
"filter" : ["lowercase","asciifolding","length","myelision"], | |
"char_filter" :["html_strip"] | |
}, |
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
float boost = (float) 1.0; | |
int minimumNumberShouldMatch = 2; | |
BoolQueryBuilder boolquery = new BoolQueryBuilder(); | |
QueryStringQueryBuilder customerqueryStringQueryBuilder = new QueryStringQueryBuilder(customerid).analyzer("mainsearchanalyzer"); | |
QueryStringQueryBuilder accountqueryStringQueryBuilder = new QueryStringQueryBuilder(secondaryMachingData).analyzer("mainsearchanalyzer"); | |
BoolQueryBuilder boolquery1 = boolquery.boost(boost).minimumNumberShouldMatch(minimumNumberShouldMatch).should(customerqueryStringQueryBuilder).should(accountqueryStringQueryBuilder); | |
SearchResponse searchResponse = client.prepareSearch(masterIndexName).setSearchType(SearchType.DEFAULT).setTypes(customerExceptionIndexName).setQuery(boolquery1).execute().actionGet(); | |
logger.debug("searchResponse Object:: \n" + searchResponse); |
OlderNewer