-
Notifications
You must be signed in to change notification settings - Fork 148
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
#987 Use ElasticSearch Java Client API #1181
#987 Use ElasticSearch Java Client API #1181
Conversation
- replaced manual creation of ElasticSearch queries with Java Client API
- Enforce consistent version of ElasticSearch across modules
- Removed unused JSON classes
...src/main/java/de/tudarmstadt/ukp/inception/externalsearch/elastic/ElasticSearchProvider.java
Outdated
Show resolved
Hide resolved
...src/main/java/de/tudarmstadt/ukp/inception/externalsearch/elastic/ElasticSearchProvider.java
Outdated
Show resolved
Hide resolved
...src/main/java/de/tudarmstadt/ukp/inception/externalsearch/elastic/ElasticSearchProvider.java
Outdated
Show resolved
Hide resolved
Jenkins, can you test this please? |
...src/main/java/de/tudarmstadt/ukp/inception/externalsearch/elastic/ElasticSearchProvider.java
Outdated
Show resolved
Hide resolved
@rgabbard thanks for checking in. We'll review if/how the randomness is preserved. ATM the build fails because of some odd JavaDoc problem.... once that is fixed, I'll have another look at the code. |
@reckart : Thanks - we have an intern @qpwo who is looking into isi-vista/curated-training-annotator#16 ; I'd be happy to have him test/fix the random ranking on top of this branch if it won't get in @az79nefy 's way. |
Sorry, I have not finished this PR yet, it is still work in progress. I have not come around to do random ranking yet, but if @qpwo wants to look into it, I'd be happy for the help. |
- Switch from transport to REST high-level client - Set ElasticSearch version such that its Lucene dependency aligns with the one we have for MTAS and RDF4J
I have switched the code to use the REST high-level client which seems to be the API of choice these days for ElasticSearch. I tried all kinds of tricks to fix the problem that ElasticSearch imports cannot be resolved by JavaDoc, but without success. When building using
... none worked. The RDF4J people hit the same problem though... maybe someone over there finds a solution: eclipse-rdf4j/rdf4j#1148 |
- added ability to do random ranking of query results - introduced constant for strings such as "metadata"
- added querying of individual documents (GetRequest) for Java API - removed more unused JSON classes - added test to assert that retrieved document text is not null
- fixed dependencies
- the key of the highlights map is the default field - modified documentation about the expected fields of the ES document
* made random search constantify the match quality so that result orderings are properly random. for issue #16 * added random seeding (need to change fixed seed) * switch to aTraits.getSeed(), which still needs to somehow be different for different users
For the time being, I am disabling the |
@az79nefy are there any code changes here that are left to be done? |
Nope, no changes left to be done. This PR can be merged. |
What's in the PR
How to test manually
Automatic testing
Documentation