Skip to content
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

Elasticsearch Documentation and Implementation Differences #862

Closed
alexiudice opened this issue Jul 16, 2018 · 0 comments
Closed

Elasticsearch Documentation and Implementation Differences #862

alexiudice opened this issue Jul 16, 2018 · 0 comments

Comments

@alexiudice
Copy link
Contributor

alexiudice commented Jul 16, 2018

While learning to use the apoc Elasticsearch integration I found some head-scratching problems. There are discrepancies between the apoc Elasticsearch methods and the apoc Elasticsearch documentation.

  1. The documentation and implementation for 'apoc.es.post' differ on the id parameter. The documentation has no id parameter, but the function REQUIRES an id parameter when being used. This seems to be a mistake, as it makes the apoc.es.post and apoc.es.put implementations identical. From the documentation it seems they should be different and apoc.es.post is not supposed to include an id, since elasticsearch can automatically generate it.

  2. Documentation on both apoc.es.post and apoc.es.put are wrong on the last parameter. The documentation says the last param can be payload-or-null. The payload cannot be ‘null’, or Neo4j (tested on Neo4j version 3.2.9) throws the following exception:

Failed to invoke procedure 'apoc.es.post': Caused by: java.lang.RuntimeException: Can't read url http://localhost:9200/test-index/doc/1 as json: cannot write to a URLConnection if doOutput=false - call setDoOutput(true).

The parameter also cannot be missing, as no default is set. The only acceptable parameter is some sort of map.

@alexiudice alexiudice changed the title Elasticsearch Integration Documentation and Implementation Elasticsearch Documentation and Implementation Jul 16, 2018
alexiudice added a commit to graphgrid/neo4j-apoc-procedures that referenced this issue Jul 16, 2018
…eir documentation.

Added a fix to the documentation.
alexiudice added a commit to graphgrid/neo4j-apoc-procedures that referenced this issue Jul 16, 2018
alexiudice added a commit to graphgrid/neo4j-apoc-procedures that referenced this issue Jul 16, 2018
…eir documentation.

Added a fix to the documentation.
@alexiudice alexiudice changed the title Elasticsearch Documentation and Implementation Elasticsearch Documentation and Implementation Differences Jul 17, 2018
@jexp jexp closed this as completed in aba1611 Jul 18, 2018
jexp pushed a commit that referenced this issue Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant