-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Remove core Elasticsearch dependency #289
Conversation
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.
minor comments, lgtm
@@ -13,7 +13,7 @@ JanusGraph. | |||
[options="header"] | |||
|========================== | |||
| JanusGraph | Cassandra | HBase | Bigtable | Elasticsearch | Solr | TinkerPop | |||
| 0.1.0 | 1.2.z, 2.0.z, 2.1.z | 0.98.z, 1.0.z, 1.1.z, 1.2.z | 0.9.z | 2.z,5.z* | 5.2.z | 3.2.z | | |||
| 0.1.0 | 1.2.z, 2.0.z, 2.1.z | 0.98.z, 1.0.z, 1.1.z, 1.2.z | 0.9.z | 1.z*,2.z,5.z | 5.2.z | 3.2.z | |
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.
was this an omission the first time we updated versions.txt? did we always support 1.z*?
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.
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.
Version compatibility is different from ease of testing, so I think 1.z can stay in this list.
import static org.janusgraph.diskstorage.es.ElasticSearchConstants.ES_INLINE_KEY; | ||
import static org.janusgraph.diskstorage.es.ElasticSearchConstants.ES_LANG_KEY; | ||
import static org.janusgraph.diskstorage.es.ElasticSearchConstants.ES_SCRIPT_KEY; | ||
import static org.janusgraph.diskstorage.es.ElasticSearchConstants.*; |
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.
please import the individual constants, unless the above were all of them.
default: | ||
throw new IllegalArgumentException("Unexpected relation: " + numRel); | ||
} | ||
} else if (value instanceof String) { | ||
Mapping map = getStringMapping(informations.get(key)); | ||
String fieldName = key; | ||
if (map==Mapping.TEXT && !janusgraphPredicate.toString().startsWith("CONTAINS")) |
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.
externalize the CONTAINS constant here and everyhwere
switch (shape.getType()) { | ||
case CIRCLE: | ||
Geoshape.Point center = shape.getPoint(); | ||
sb = ShapeBuilder.newCircleBuilder().center(center.getLongitude(), center.getLatitude()).radius(shape.getRadius(), DistanceUnit.KILOMETERS); | ||
geo = ImmutableMap.of(ES_TYPE_KEY, "circle", | ||
"coordinates", ImmutableList.of(center.getLongitude(), center.getLatitude()), |
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.
externalize coordinates constant here and everyhwere
|
||
@Override | ||
public Map<String,Object> createKeywordMapping() { | ||
return ImmutableMap.of(ES_TYPE_KEY, "string", ES_INDEX_KEY, "not_analyzed"); |
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.
externalize string constant
986fa94
to
bc5790f
Compare
Please hold off on merging this until #233 is merged as I'd like to rebase and resolve conflicts here. |
@sjudeng ok to rebase and resolve conflicts here. |
…arch:elasticsearch dependency. Remove support for Transport client. Add compatibility shims to resolve deprecation warnings under ES5 and restore support for ES1. Support testing against an external ES instance. Signed-off-by: sjudeng <[email protected]>
Remove core Elasticsearch dependency
Remove core Elasticsearch dependency
This PR removes support for the Elasticsearch Transport client and updates to manually build request objects instead of using the ES Java API. This allows for the removal of the
org.elasicsearch:elasticsearch
dependency and the addition of compatibility shims that resolve deprecation warnings under Elasticsearch 5.x and also restores support for Elasticsearch 1.x without requiring custom builds.Related issue is #92.