> On May 22, 2025, 4:19 p.m., Madhan Neethiraj wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/util/SearchFilter.java
> > Lines 148 (patched)
> > <https://reviews.apache.org/r/75389/diff/2/?file=2298638#file2298638line148>
> >
> >     I suggest changing following query-parameters:
> >     ```
> >     public static final String IS_FULL_LABEL_MATCH          = 
> > "isFullLabelMatch";
> >     public static final String IS_FULL_KEYWORD_MATCH        = 
> > "isFullKeywordMatch";
> >     ```
> >     
> >     to:
> >     
> >     ```
> >     public static final String LABEL_MATCH_TYPE   = "datasetLabelMatchType";
> >     public static final String KEYWORD_MATCH_TYPE = 
> > "datasetKeywordMatchType";
> >     
> >     ```
> >     
> >     This will enable search to support various type of matches: full, 
> > partial, startsWith, endsWith. We can choose to support only  full and 
> > partial match types in current patch.

Since the default and existing behavior already handles partial matches, I 
focused on supporting full match as the remaining case. That's why I added a 
simple check to determine if a full match is required—this avoids unnecessary 
matching and filtering logic for the partial case, which was already covered. 
However I updated the patch with suggested code changes.


- Radhika


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75389/#review227324
-----------------------------------------------------------


On May 22, 2025, 10:05 p.m., Radhika Kundam wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75389/
> -----------------------------------------------------------
> 
> (Updated May 22, 2025, 10:05 p.m.)
> 
> 
> Review request for ranger, Madhan Neethiraj and Ramesh Mani.
> 
> 
> Bugs: RANGER-5213
>     https://issues.apache.org/jira/browse/RANGER-5213
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Dataset Search and Summary APIs should support filtering by isEnabled and 
> Partial/Exact text search for Labels and Keywords.
> Label and Keyword Filtering Enhancements
> Partial Match (Existing Behavior - Performs a case-insensitive substring 
> search):
>    datasetLabel
>    datasetKeyword
> 
> Exact/Full Match (New Behavior):
> Query parameters introduced:
>    datasetLabelMatchType=full
>    datasetKeywordMatchType=full
> 
> When these flags are set to full, the corresponding datasetLabel or 
> datasetKeyword values must match exactly(case-insensitive).
> Without the flags, partial match remains the default.
> 
> isEnabled Filter
> New query parameter: isEnabled
> Filters datasets based on their enabled/disabled status.
> Only datasets with the specified status will be included in the results.
> Example: isEnabled=true returns only enabled datasets.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/SearchFilter.java 
> 717b94c67 
>   security-admin/src/main/java/org/apache/ranger/common/RangerSearchUtil.java 
> a76c2b5a3 
>   security-admin/src/main/java/org/apache/ranger/rest/GdsREST.java 84009c3fa 
>   
> security-admin/src/main/java/org/apache/ranger/service/RangerGdsDatasetService.java
>  8ace32a53 
> 
> 
> Diff: https://reviews.apache.org/r/75389/diff/3/
> 
> 
> Testing
> -------
> 
> Tested locally
> 
> 
> Thanks,
> 
> Radhika Kundam
> 
>

Reply via email to