River Plugin should wait until a specific mapping is added and then it should index the documents

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

River Plugin should wait until a specific mapping is added and then it should index the documents

Isabella

Hello!


I have to create a river plugin that index documents from a PostgreSQL database. My problem is that my plugin should wait until a specific mapping is added and then it should index the documents.

Is there any possibility to do this, or how can I tell the plugin that it should wait until the mapping is added?


Thanks a lot!


Best regards,

Isabella

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: River Plugin should wait until a specific mapping is added and then it should index the documents

joergprante@gmail.com
Thanks for the enhancement request. I have openend an issue https://github.com/jprante/elasticsearch-river-jdbc/issues/140

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: River Plugin should wait until a specific mapping is added and then it should index the documents

Isabella
Hello!

I have one more question regarding the mappings. Does anyone know if there is a possibility to get all mappings, that are defined in ES via Java API? 
So I would like to receive all defined mappings, but without specifying the index name or the type name. I didn't found anything in the ES documentation.

Thanks a lot.

Best regards, 
Isabella

Am Montag, 25. November 2013 14:56:30 UTC+1 schrieb Jörg Prante:
Thanks for the enhancement request. I have openend an issue https://github.com/jprante/elasticsearch-river-jdbc/issues/140

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: River Plugin should wait until a specific mapping is added and then it should index the documents

joergprante@gmail.com
For an example, look at org.elasticsearch.rest.action.admin.indices.mapping.get.RestGetMappingAction

The trick is to issue a cluster state request 

        ClusterStateRequest clusterStateRequest = Requests.clusterStateRequest()
                .filterRoutingTable(true)
                .filterNodes(true);

In the returned result, all indices and mappings can be filtered out.

Jörg


--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG0AmZnFMuSoLxdFJCU4Dzh%2BtSUArJ9r3GPOx%3DrLjSHZg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: River Plugin should wait until a specific mapping is added and then it should index the documents

Isabella
Thanks a lot for your answer. It works!

Isabella

Am Dienstag, 26. November 2013 20:10:43 UTC+1 schrieb Jörg Prante:
For an example, look at org.elasticsearch.rest.action.admin.indices.mapping.get.RestGetMappingAction

The trick is to issue a cluster state request 

        ClusterStateRequest clusterStateRequest = Requests.clusterStateRequest()
                .filterRoutingTable(true)
                .filterNodes(true);

In the returned result, all indices and mappings can be filtered out.

Jörg


--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d6b9d4a6-8052-42b2-95fd-0b8c46a84da7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.