Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

QueryBuilder multiple tag search

Avatar

Avatar
Validate 10
Level 4
sandeepm744005
Level 4

Likes

19 likes

Total Posts

127 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 4
sandeepm744005
Level 4

Likes

19 likes

Total Posts

127 posts

Correct Reply

13 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
sandeepm744005
Level 4

30-03-2017

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" ?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 8
MC_Stuff
Level 8

Likes

78 likes

Total Posts

467 posts

Correct Reply

158 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 8
MC_Stuff
Level 8

Likes

78 likes

Total Posts

467 posts

Correct Reply

158 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
MC_Stuff
Level 8

30-03-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,

Answers (1)

Answers (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

30-03-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.