Hi,
I do want to index data filtering, add filtering criteria Filter, but has been an error, what filters are "filter": {"active": true}, where this condition was wrong?
If you do not add this condition, there is no mistake!
1 error
at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344)
at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110)
at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:131)
at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69)
at org.elasticsearch.river.RiversService.createRiver(RiversService.java:140)
at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:273)
at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:267)
at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:113)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.mongodb.util.JSONParseException:
{active=true}
^
at com.mongodb.util.JSONParser.read(JSON.java:280)
at com.mongodb.util.JSONParser.parseObject(JSON.java:240)
at com.mongodb.util.JSONParser.parse(JSON.java:205)
at com.mongodb.util.JSONParser.parse(JSON.java:155)
at com.mongodb.util.JSON.parse(JSON.java:93)
at com.mongodb.util.JSON.parse(JSON.java:74)
Hi, I do want to index data filtering, add filtering criteria Filter, but has been an error, what filters are "filter": {"active": true}, where this condition was wrong?
If you do not add this condition, there is no mistake!
curl -XPUT "xxx:19200/_river/articles/_meta" -d ' { "type": "mongodb", "mongodb": { "db": "redbull", "host": "192.168.1.x", "port": "27017", "collection": "articles", "options": { "include_fields": [ "title", "author","description","images","url","type","category_id", "tags","created_at", "published", "active", "origin_url", "readings_count" ] }, "filter": { "active": true } }, "index": { "name": "articles", "type": "article", "bulk_size": "1000", "bulk_timeout": "60" } }'
Error:
1 error at org.elasticsearch.common.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:344) at org.elasticsearch.common.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:178) at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:110) at org.elasticsearch.common.inject.InjectorImpl.createChildInjector(InjectorImpl.java:131) at org.elasticsearch.common.inject.ModulesBuilder.createChildInjector(ModulesBuilder.java:69) at org.elasticsearch.river.RiversService.createRiver(RiversService.java:140) at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:273) at org.elasticsearch.river.RiversService$ApplyRivers$2.onResponse(RiversService.java:267) at org.elasticsearch.action.support.TransportAction$ThreadedActionListener$1.run(TransportAction.java:113) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: com.mongodb.util.JSONParseException: {active=true} ^ at com.mongodb.util.JSONParser.read(JSON.java:280) at com.mongodb.util.JSONParser.parseObject(JSON.java:240) at com.mongodb.util.JSONParser.parse(JSON.java:205) at com.mongodb.util.JSONParser.parse(JSON.java:155) at com.mongodb.util.JSON.parse(JSON.java:93) at com.mongodb.util.JSON.parse(JSON.java:74)