QueryBuilder multiple tag search | Community
Skip to main content
sandeepm744005
New Participant
March 30, 2017
Solved

QueryBuilder multiple tag search

  • March 30, 2017
  • 2 replies
  • 2563 views

Hi Folks, we have a requirement where we have to search in the repository based on tags and display the three top records accordingly.

For example - Suppose we need to search for the pages based on these tags -

geometrixx-outdoors:apparel
geometrixx-media:events
mynamespace:my-tag

Page which has all three tags should come on the top then the pages which has 2 matching tags and finally the pages which has one of the matching tag. If we use "property.and" then only the pages will come in the listing which has all three tags. "property.or", may also not be able to fit in this situation.

map.put("property.and","true"); map.put("property.1_value","geometrixx-outdoors:apparel"); map.put("property.2_value","geometrixx-media:events"); map.put("property.3_value","mynamespace:my-tag");

Could you please advice if there is any other way other than to do the manual fitering of the results once i get it with "property.or" ?

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 MC_Stuff

Hi Sandeep,

You need to update the index defnition to update the property for boosting. Refer Boost and Search Relevancy at [A]

[A] http://jackrabbit.apache.org/oak/docs/query/lucene.html

Thanks,

2 replies

MC_Stuff
MC_StuffAccepted solution
New Participant
March 31, 2017

Hi Sandeep,

You need to update the index defnition to update the property for boosting. Refer Boost and Search Relevancy at [A]

[A] http://jackrabbit.apache.org/oak/docs/query/lucene.html

Thanks,

smacdonald2008
New Participant
March 30, 2017

AEM gives you the ability to build custom tag libraries that can be used while seaching. See: 

https://scottsdigitalcommunity.blogspot.ca/2016/05/using-custom-tag-libraries-to-search.html

Hope this helps.