Skip to content

displayName (and other config fields) not included in uploadToFileSearchStore request #821

Description

@kopher1601

Environment details

  • Programming language: Java
  • OS: macOS
  • Language runtime version: Java 11+
  • Package version: 1.38.0

Steps to reproduce

  1. Create an UploadToFileSearchStoreConfig with displayName set:
UploadToFileSearchStoreConfig config = UploadToFileSearchStoreConfig.builder()
  .displayName("my-document")
  .build();

client.fileSearchStores.uploadToFileSearchStore(storeName, file, config);
  1. The displayName is silently dropped from the actual API request.

Root Cause

In FileSearchStores.java, the getUploadUrl() method (line 910-915) creates a new UploadToFileSearchStoreConfig with only httpOptions and shouldReturnHttpResponse, discarding the original config's fields:

UploadToFileSearchStoreResumableResponse response =
  privateUploadToFileSearchStore(
      fileSearchStoreName,
      UploadToFileSearchStoreConfig.builder()
          .httpOptions(httpOptions)
          .shouldReturnHttpResponse(true)
          .build());

This also affects customMetadata and chunkingConfig.

Expected Behavior

The original config fields (displayName, customMetadata, chunkingConfig) should be preserved and included in the request to the API.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions