typesense-java icon indicating copy to clipboard operation
typesense-java copied to clipboard

Allow return the id of the imported documents

Open rpinzon opened this issue 1 year ago • 2 comments

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

rpinzon avatar Feb 20 '24 17:02 rpinzon

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

shinusuresh avatar Feb 29 '24 18:02 shinusuresh

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

kishorenc avatar Mar 01 '24 02:03 kishorenc

yes, I need it too

stargazer33 avatar Aug 12 '24 15:08 stargazer33