Partial text search on custom property in Querybuilder | Community
Skip to main content
Adobe Employee
June 6, 2024
Solved

Partial text search on custom property in Querybuilder

  • June 6, 2024
  • 1 reply
  • 746 views

Hi Team,

I want to search partial text over my custom property. when i search with fullvalue, it works but when i tried partial value , its not working. Even I have tried with property.operation=like. and also added * wildcard at starting and ending of the text. Nothing works. Only in fulltext its working but it will search on all the property but i want to search on my property alone.

Tried to gave fulltext.relpath=jcr:content/metadata/@customproperty  with fulltext search ,but its not showing any results.

 

Please provide any pointers

 

 

@veenavikraman @aanchal-sikka @hrishikeshkagne @estebanbustamante @arunpatidar @gkalyan 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by HrishikeshKagne

Hi @amsalek4 ,

To perform a partial text search on a custom property in QueryBuilder, you can use the `property` predicate with the `like` operation and the wildcard character `%` to match any number of characters before or after the search term.

Here's an example QueryBuilder query that searches for nodes where the custom property "myCustomProperty" contains the text "example":

```
path=/content/mypage
type=myNodeType
property=myCustomProperty
property.operation=like
property.value=%example%
```

Make sure to replace `myNodeType`, `myCustomProperty`, and `/content/mypage` with the appropriate values for your use case.

If you're still not getting any results, you may want to check that the custom property is being indexed correctly and that the search term is spelled correctly. You can also try using the `contains` operation instead of `like` to see if that returns any results.

1 reply

HrishikeshKagne
Community Advisor
HrishikeshKagneCommunity AdvisorAccepted solution
Community Advisor
June 6, 2024

Hi @amsalek4 ,

To perform a partial text search on a custom property in QueryBuilder, you can use the `property` predicate with the `like` operation and the wildcard character `%` to match any number of characters before or after the search term.

Here's an example QueryBuilder query that searches for nodes where the custom property "myCustomProperty" contains the text "example":

```
path=/content/mypage
type=myNodeType
property=myCustomProperty
property.operation=like
property.value=%example%
```

Make sure to replace `myNodeType`, `myCustomProperty`, and `/content/mypage` with the appropriate values for your use case.

If you're still not getting any results, you may want to check that the custom property is being indexed correctly and that the search term is spelled correctly. You can also try using the `contains` operation instead of `like` to see if that returns any results.

Hrishikesh Kagane
Amsalek4Adobe EmployeeAuthor
Adobe Employee
June 6, 2024

@hrishikeshkagne 

Thanks a lot. its working.  I missed "%" in the search term but used "*" instead.