how to find the title which is repeated among two different content path using querybuilder in aem 6.5.
i need this result as com.day.cq.search.result.SearchResult result. i am using this result object for pagination, total cound , exeution time in search results.
i have tried with below approach
- i have using the below constrainsts and getting the results then assign to one list and finding the repeated title then using result list. but while doing pagination and total count its giving worng data.
but i want to achieve this in query itself.
could you please give me right direction.
Thanks in advance.
Reply from @nareshkumarpart
Thanks, Vaibhavi, Actually I have written the utility to remove the duplicates and setting the node property. So after that, I have matching the predicates in our application to fetch the records in a search. it gives somehow better performance, and without affecting the pagination logic.
@nareshkumarpart Can you please share some more details about this utility for posterity?
Use SQL2 queries to perform complex comparison.
Thanks vaibhavi for your response.
- Actually the issue , Same title presents in two different content path. i want to make it one and show it in results.
Is there any way to find the repeated title in two different path . Any join quires can achieve this using query builder.
If i get the answer for this i can resolve this issue..
Thanks in advance for your responses.
In below query offset and plimit value is statically set. So during pagination you are not receiving the proper count.
Please update the offset and plimit value dynamically. Example:From above query,in first iteration you have received the results from 0(offset is set to 0)to 10(plimit is set for 10 records). In second iteration you should fetch next 10 result, so your offset should be updated to 10 and plimit as 20.
This should fix your issue.
Below summarizing for better understanding: