After I reenable the ES output in logstash conf file
input {
We read from the "old" index
elasticsearch {
hosts => ["10.8.44.122:9200"]
user => "esadmin"
password => "dev01"
index => "es_item2"
size => 500
scroll => "5m"
docinfo => true
}
}
filter {
}
output {
if [ITEM_TYPE] == "SGI" {
We write to the "new" index
elasticsearch {
host => "10.8.44.122:9200"
protocol => "http"
user => "esadmin"
password => "dev01"
index => "es_item1"
document_type => "%{[@metadata][_type]}"
document_id => "%{[@metadata][_id]}"
}
We print dots to see it in action
stdout {
codec => "dots"
}
}
}
below is the response of logstash run and it stucked in somewhere..
[esadmin@tparhebfmi003 logstash-1.5.5]$ bin/logstash -f logstash.conf
Logstash startup completed
.............................
Below is the ES client logs,
[2016-02-26 03:59:18,631][DEBUG][action.search.type ] [tparhebfmi003_PERF_CLIENT] All shards failed for phase: [query]
org.elasticsearch.transport.RemoteTransportException: [tparhebfmi005_PERF_DATA][inet[/10.8.44.124:9260]][indices:data/read/search[phase/query]]
Caused by: org.elasticsearch.search.SearchParseException: [ogrds_item2][11]: from[-1],size[-1],sort[,<custom:"CRT_DTTM": org.elasticsearch.index.fielddata.fieldcomparator.LongValuesComparatorSource@7cfd8342>!]: Parse Failure [Failed to parse source [{"sort":[{"_score":{"order":"desc"}},{"CRT_DTTM":{"order":"desc"}}],"query":{"filtered":{"query":{"bool":{"should":[]}},"filter":{"bool":{"must":[{"bool":{"should":[{"nested":{"query":{"match":{"EXTRN_CODE_CONTAINS":"4023900543008"}},"path":"XCD"}}]}},{"bool":{"should":[{"nested":{"query":{"filtered":{"filter":{"terms":{"XCD.PROC_GRP_ID":["REWE - PETZ REPEZ (DE)"]}}}},"path":"XCD"}}]}},{"bool":{"should":[{"query":{"filtered":{"filter":{"terms":{"ITEM_SPECIFICITY_REF_ID":[184]}}}}}]}}]}}}},"from":0,"fields":["MOD_DSCR","ITEM_CODE","ITEM_DSCR","IS_SHARED_IND","HAS_IMAGE_IND","DIST.RGN_NM","HAS_HIST_IND","ITEM_TYPE","CRT_DTTM","ITEM_MISUSED_GTIN_FLG"],"size":2000}]]
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:747)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:572)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:544)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:306)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:776)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:767)
at org.elasticsearch.shield.transport.ShieldServerTransportService$ProfileSecuredRequestHandler.messageReceived(ShieldServerTransportService.java:176)
at org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.doRun(MessageChannelHandler.java:279)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:36)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NumberFormatException: For input string: "REWE - PETZ REPEZ (DE)"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:589)
at java.lang.Long.parseLong(Long.java:631)
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseLongValue(NumberFieldMapper.java:354)
at org.elasticsearch.index.mapper.core.LongFieldMapper.indexedValueForSearch(LongFieldMapper.java:171)
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.termFilter(AbstractFieldMapper.java:469)
Regards,
Ganeshbabu R