Querybuilder OR group issue

Avatar

Avatar

Riju_Mahana

Avatar

Riju_Mahana

Riju_Mahana

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

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861
Arun_Patidar
MVP

23-08-2018

Your Query looks correct.

Can you try with other keywords?

Avatar

Avatar

Riju_Mahana

Avatar

Riju_Mahana

Riju_Mahana

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

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861

Avatar

Arun_Patidar

MVP

Total Posts

3.0K

Likes

1.1K

Correct Reply

861
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

edubey

Avatar

edubey

edubey

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

Riju_Mahana

Avatar

Riju_Mahana

Riju_Mahana

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.