typesense / typesense-java

Java client for Typesense
https://typesense.org/docs/latest/api/
Apache License 2.0
58 stars 28 forks source link

Allow return the id of the imported documents #55

Closed rpinzon closed 1 month ago

rpinzon commented 8 months ago

Description

According to the documentation it's possible to configure the import response to return the ingested document's id in the response. To achieve this you can use the return_id parameter.

The import_ function allows us to provide an instance of ImportDocumentsParameters. However, this class does not provide a way to configure the flag return_id.

Steps to reproduce

Check the methods of ImportDocumentsParameters class.

Expected Behavior

I expect to be able to configure the return_id flag using either a setter or a builder method within the ImportDocumentsParameters class.

For example:

Using setter method:

ImportDocumentsParameters params = new ImportDocumentsParameters();
params.setReturnId(true);

Using builder method:

ImportDocumentsParameters params = new ImportDocumentsParameters().returnId(true);

Actual Behavior

It's not possible to configure the return_id flag.

Metadata

Typesense Version: 0.25.2

OS: N/A

shinusuresh commented 8 months ago

@kishorenc Looks like an issue with API spec. I don't see return_id in openapi spec.

kishorenc commented 8 months ago

Yes this needs to be added to the openapi spec so that it works with the Java client.

stargazer33 commented 2 months ago

yes, I need it too