Hi, I'm trying to use group by option to remove duplicates from my search result. I'm applying Group By option on a field called TopicId. I'm simply appending this at the end of my query.
group=true&group.field=TopicId Initially, the result looked great as I was able to see the duplicates getting removed and only the document with highest score among the duplicates,is being returned. But then when I started comparing the result without the group by option, something doesn't look right. For e.g. the search without a group by option returned results from Source "A", "B" and "C". Documents from Source "A" have the TopicId field while it's not present in "B" or "C". When I add the Group-By option, the documents from "B" and "C" are completely ignored, though some of them have scores higher than A. I'm little confused if this is the intended behavior. Does group-by mean that it'll only return results where the group-by field is present ? Do I need to use additional group-by parameters to address this ? Any pointers will be highly appreciated. Thanks, Shamik