-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Elastica\Query\Image #787
Conversation
2 similar comments
Is this plugin alive? I see they support ES 1.1.0, and last commit was half a year ago. |
I use https://github.com/ifgh/elasticsearch-image which is a 1.4.2 fork. |
$query->setFieldHash($field, 'BIT_SAMPLING'); | ||
$query->setFieldBoost($field, 100); | ||
|
||
$query->setFieldImage($field, __DIR__ . '/../../../../data/test.jpg'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To have a more readable path, check here: https://github.com/ruflin/Elastica/blob/master/test/lib/Elastica/Test/IndexTest.php#L124
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx.
To make sure it works with the current version, we should add an integration tests, which means we must add the plugin to our setup process. Like this we can also be sure it works with future versions. Also we should add it then to the dependencies in the README file: https://github.com/ruflin/Elastica @Jmoati If you need some help to get the setup done etc. we are here to help. |
I will try this as soon as i can. |
1 similar comment
Can you please check. |
- name: install image plugin | ||
command: > | ||
creates=/usr/share/elasticsearch/plugins/image | ||
/usr/share/elasticsearch/bin/plugin --url https://github.com/SibaTokyo/elasticsearch-image/releases/download/{{ ES_IMAGE_PLUGIN_VER }}/elasticsearch-image-1.4.0.zip -install image |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess "1.4.0" at the end of url also should use ES_IMAGE_PLUGIN_VER.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fixed.
All classes in But this query isn't part of elasticsearch, so I'm not sure should it be added to querybuilder or not. |
Maybe, the PR can be accepted before I implement it in QueryBuilder if necessary? |
2 similar comments
Merged. Yes we can add it to the query builder in a second step. |
Thx. |
I would prefer not to add it to Query DSL class because it is not an official elasticsearch query. Furthermore it will be difficult to update the Version classes with custom queries in the future. However we could implement a new "plugin" DSL in QueryBuilder and put all the custom plugin stuff in there
|
@webdevsHub I like the "plugin DSL" idea. |
I will look into that during weekends. I want to add some comments to the
QB unit tests anyway.
Are there any other plugin related queries/aggs already implemented in
Elastica that should be added to the new QB part?
|
All the plugins are listed here in the README: https://github.com/ruflin/Elastica Geocluster and attachment are the other two. |
Add support of https://github.com/kzwang/elasticsearch-image