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 OR group issue

Avatar

Avatar
Ignite 1
Level 2
Riju-Mahna
Level 2

Likes

8 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Ignite 1
Level 2
Riju-Mahna
Level 2

Likes

8 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
Riju-Mahna
Level 2

23-08-2018

I am trying a simple query with 2 paths using group and OR relation as given on:

Query Builder Predicate Reference  in a vanilla 6.2 instance

the query reads as below and returns only 2 results

fulltext=geometrixx

group.p.or=true
group.1_group.path=/content/geometrixx/en
group.1_group.type=cq:Page
group.2_group.path=/content/dam/geometrixx
group.2_group.type=dam:Asset

But if I remove the OR grouping and run with only 1 group at a time, I get a hugely different set of results.

For example, only the cq:Page part gives 57 results

fulltext=geometrixx
group.1_group.path=/content/geometrixx/en
group.1_group.type=cq:Page

And the dam:Asset part gives 100 results:

fulltext=geometrixx
group.2_group.path=/content/dam/geometrixx
group.2_group.type=dam:Asset

Shouldn't the OR query then return 157 results ? Or is there something wrong in the query ?

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,348 likes

Total Posts

3,226 posts

Correct Reply

916 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,348 likes

Total Posts

3,226 posts

Correct Reply

916 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

23-08-2018

Your Query looks correct.

Can you try with other keywords?

Avatar

Avatar
Ignite 1
Level 2
Riju-Mahna
Level 2

Likes

8 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Ignite 1
Level 2
Riju-Mahna
Level 2

Likes

8 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
Riju-Mahna
Level 2

27-08-2018

I wanted to verify the validity of this query format before using this in my application.

Changing the parameters to make it work kills the whole purpose IMHO. If it works with different parameters, it can't be trusted to work all the time then.

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,348 likes

Total Posts

3,226 posts

Correct Reply

916 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,348 likes

Total Posts

3,226 posts

Correct Reply

916 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

27-08-2018

Hi,

I can understand but I don't have same data to validate from my end.

I tried with some sample data and your query gives expected results.

Just to check if we missing something here.

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

275 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

275 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

29-08-2018

I am seeing queries are working proper in my 6.3 and 6.4.

You may want to try in new or some other machine once

Avatar

Avatar
Ignite 1
Level 2
Riju-Mahna
Level 2

Likes

8 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile

Avatar
Ignite 1
Level 2
Riju-Mahna
Level 2

Likes

8 likes

Total Posts

31 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 5
Give Back 3
View profile
Riju-Mahna
Level 2

30-08-2018

edubey​ . .Thanks.

I also gave it a shot in 6.4 for we.retail website. And Yes, the results do seem to match up there.

But my application is in 6.2 and I wonder what is wrong with that version. This seemed a very basic search operation to me.