opensearch-project / opensearch-project/opensearch-java

[FEATURE] support dynamic schema for creating/updating document

Open
#527 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.