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

MTermVector Java High Level Client Misses Fields Property #42232

Closed
bisztray opened this issue May 20, 2019 · 9 comments · Fixed by #48840
Closed

MTermVector Java High Level Client Misses Fields Property #42232

bisztray opened this issue May 20, 2019 · 9 comments · Fixed by #48840
Labels
>bug good first issue low hanging fruit

Comments

@bisztray
Copy link

elasticsearch-rest-high-level-client - 7.0.1

Expected vs Actual Behaviour AND steps to reproduce:

  1. Create a MultiTermVectorsRequest and add a single TermVectorsRequest WITH a field.
MultiTermVectorsRequest termVectorsRequest = new MultiTermVectorsRequest();

TermVectorsRequest textRequest = new TermVectorsRequest("index", "id");
textRequest.setFields("text");
textRequest.setTermStatistics(true);
textRequest.setFieldStatistics(false);
textRequest.setPositions(false);
textRequest.setOffsets(false);
termVectorsRequest.add(textRequest);

MultiTermVectorsResponse mtermvectors = client.mtermvectors(termVectorsRequest, RequestOptions.DEFAULT);

  1. When sending to the Java High Level Client, after transformation to low-level REST client format, the fields property is missing!

When converting to the low-level REST request in internalPerformRequest() within RestHighLevelClient.java it can be inspected that the body of the request will be the following:

{
    "docs": [
        {
            "_index": "index",
            "_id": "id",
            "positions": false,
            "offsets": false,
            "field_statistics": false,
            "term_statistics": true
        }
    ]
}

Then this is sent to the server.

  1. The elastic search will return no term vectors, since no field was given. And this renders the High Level Java Client useless for multiple term vector retrieval.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@hub-cap hub-cap added >bug good first issue low hanging fruit labels May 20, 2019
@hub-cap
Copy link
Contributor

hub-cap commented May 20, 2019

Thanks for finding this. This would be a good first issue if you are interested in contributing. Otherwise it might be a bit before it gets fixed, since it is a good first contributor issue.

@sukumaar
Copy link

@hub-cap I would like to pick this

@hub-cap
Copy link
Contributor

hub-cap commented May 21, 2019

@sukumaar awesome! go ahead and assign yourself, thanks for helping out!!!!

@sukumaar
Copy link

@hub-cap Thank you, can you please assign it to me ? I think I do not have access to do it so

@hub-cap
Copy link
Contributor

hub-cap commented May 28, 2019

hmm, it looks as if i cannot assign someone who is not in our org, sorry. But there is some chat here that shows you started, so 👍 to continue.

@ojasgulati
Copy link
Contributor

@sukumaar are you working on this?

@sukumaar
Copy link

@ojasgulati I was stuck at some exception so halted working on it. Thanks for working on it.

@peonone
Copy link
Contributor

peonone commented Oct 21, 2019

@hub-cap I'd like to pick it, the guidance here #42877 is clear to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug good first issue low hanging fruit
Projects
None yet
7 participants