[
https://issues.apache.org/jira/browse/CONNECTORS-909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917411#comment-13917411
]
Karl Wright commented on CONNECTORS-909:
----------------------------------------
Hi Abe-san,
The ElasticSearch integration test is run this way:
ant run-elasticsearch-tests-derby
also, "ant test" includes it.
As for the ManifoldCF ElasticSearch plugin, this is tricky. It is not strictly
an ElasticSearch plugin module, because at the time it was written there was no
supported way
to integrate something that modified any incoming query, other than by writing
your own code and calling it from there. This may be acceptable because ES
itself is basically just a toolkit.
I was assured that ElasticSearch would have a way of handling security filters
natively sometime soon, but I have not heard anything about whether this is
possible now or not.
As for how to use the current MCF ES plugin, I am not sure how ES finds jars
now, but I believe you would just put it in the "lib" directory. Please
experiment and let me know what you find --
I will extend the documentation based on your results.
The way you call the MCFAuthorizer class you can see in MCFAuthorizerTest. You
call the plugin like this:
Initialization (needs to happen only once -- singleton):
{code}
ConfigurationParameters cp = new ConfigurationParameters();
... modify_configuration parameters here ...
MCFAuthorizer mcfa = new MCFAuthorizer(cp);
{code}
Getting filterbuilder for a user, and searching:
{code}
FilterBuilder userFilter = mcfa.buildAuthorizationFilter(<user_name_string>);
... compose userFilter with other desired filters ...
SearchResponse response =
<Client_instance>.prepareSearch("test").setQuery(<QueryBuilder_query>).setFilter(<FilterBuilder_filter>).execute().actionGet();
... use response ...
{code}
(I expect the API to be extended to include a method like
"setSecurityFilter(<FilterBuilder_security_filter>)" in the future, if support
for security filters
is added. Then, a full, proper, MCF ES plugin could simply use that method to
modify the client object.)
I wish there was more detail, but at the moment I don't have any more help for
you. Simon Willnauer was going to take over development of the plugin but
never did.
There is online documentation, which I haven't read in a while, which describes
how to use ES in more detail, and real ES plugins too.
Maybe you want to take this over?
> Upgrade to Elasticsearch 1.0.1
> ------------------------------
>
> Key: CONNECTORS-909
> URL: https://issues.apache.org/jira/browse/CONNECTORS-909
> Project: ManifoldCF
> Issue Type: Task
> Components: Elastic Search connector
> Affects Versions: ManifoldCF 1.5.1
> Reporter: Shinichiro Abe
> Fix For: ManifoldCF 1.6
>
> Attachments: CONNECTORS-909.patch
>
>
> Update to latest version.
> Currently a connection check to latest ES fails , because of [the ES's
> issue.|https://github.com/elasticsearch/elasticsearch/issues/4310].
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)