opensearch-project / opensearch-project/opensearch-java
[BUG] GetRequest API is not returning featureAttributes as expected
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
What is the bug?
After creating index using IndexRequest, it returns the following response containing featureAttributes:aggregation:sum with "field": "value".
While retrieving the same index using GetRequest the same field is coming as null. (See under featureAttributes:aggregation.sum)
How can one reproduce the bug?
- Create index with the mapping
IndexRequest<AnomalyDetector> indexRequest = new IndexRequest.Builder<AnomalyDetector>()
.index(ANOMALY_DETECTORS_INDEX)
.document(detector)
.build();
- Get Index
getResponse = client.get(s -> s.index(ANOMALY_DETECTORS_INDEX).id(detectorId), AnomalyDetector.class);
What is the expected behavior?
GetRequest API should return the attributes which were created using IndexRequest
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the anomaly-detectors.json mapping and the IndexRequest/GetRequest examples in the issue, then reproduce the round trip for an AnomalyDetector using the OpenSearch Java client. Compare the created response with the retrieved response, focusing on featureAttributes:aggregation.sum; done means GetRequest returns the attributes created by IndexRequest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100