Skip to main content
Question

How to restrict getting Partial search results when we perform Metadata Search?

  • May 23, 2025
  • 1 reply
  • 24 views

Forum|alt.badge.img

Hello, 

We have implemented metadata search by integrating box SDK for the business purpose and we are using the below sample code by following the Box API reference

BoxSearchParameters params = new BoxSearchParameters();
params.setMetadataFilter(metadataFilter);
BoxSearch search = new BoxSearch(connection);
PartialCollection<BoxItem.Info> searchResults = search.searchRange(0, 1000, params);

Currently, we are experiencing problems with search results in some cases like  
For Ex: When we are searching a string "test" as a value in the search attribute we are expected files with only the metadata attribute value "test" instead we are getting the files that have values "test-box", "test-box1" etc., we figure out the search is working as "Exact Matches" as specified in the below link: 

Exact Matches link: https://developer.box.com/guides/search/query-operators/#exact-matches-with

Please suggest a way to get the search responses that have the exact string matches since we are unable to debug deep-dive into Box Native SDK classes. 

Thanks, 
Raja Vaghicharla 

1 reply

Forum|alt.badge.img

Hi Raja,

I'm trying to replicate your use case, but I do not have enough information.

Can you elaborate on the details?

Please include your metadata template and the metadata for some sample files.