Expand my Community achievements bar.

Querybuilder OR group issue

Avatar

Level 3

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 ?

5 Replies

Avatar

Community Advisor

Your Query looks correct.

Can you try with other keywords?



Arun Patidar

Avatar

Level 3

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

Community Advisor

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.



Arun Patidar

Avatar

Level 10

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

Level 3

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.