opensearch-project / opensearch-project/opensearch-java
[FEATURE] support dynamic schema for creating/updating document
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Description
Is your feature request related to a problem?
List opsList = new ArrayList<>();
for (JSONObject event : events) {
BulkOperation op = new BulkOperation.Builder().create(o -> o
.index(indexName.toLowerCase())
.document(event)
).build();
opsList.add(op);
}
BulkRequest bulkRequest = new BulkRequest.Builder().operations(opsList).build();
BulkResponse bulkResponse = client.bulk(bulkRequest);
Here, I am trying to create new documents. Instead of using a customer class, I am using the json as the document input. The document will be created without any content.
What solution would you like?
I would like to create document API to accept the Json type input
What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.
Do you have any additional context?
Add any other context or screenshots about the feature request here.
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 by tracing the BulkOperation and BulkRequest entry points shown in the issue, and inspect how document inputs are currently handled. No source file or test is named; done should be a documented API path that accepts JSON input for creating or updating documents and preserves the supplied content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, json
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100