sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Retrieve duplicate search results using the TrimDuplicatesIncludeId property - CollapseSpecification set to false doesn't work.

Open AJIXuMuK opened this issue 4 years ago • 13 comments

The documentation says:

Use TrimDuplicatesIncludeId to retrieve the duplicates of a document when TrimDuplicates is true and TrimDuplicatesOnProperty or CollapseSpecification is set to false.

It stopped working in SharePoint Online. Now, you should use CollapseSpecification='DocumentSignature: 1' to make it work.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

AJIXuMuK avatar Oct 05 '20 16:10 AJIXuMuK

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Oct 05 '20 16:10 ghost

@wobba Can you chime on on this? Are the docs incorrect and should be updated? If so, is this a unique setting in SPO vs. SP on-prem?

andrewconnell avatar Oct 05 '20 17:10 andrewconnell

@karolikl And idea if there has been a change here? Docs state you can use TrimDuplicatesOnProperty for backwards compat.

@AJIXuMuK I would change to collapsespec anyways, which has been the recommended approach for years.

wobba avatar Oct 05 '20 19:10 wobba

@wobba just to clarify: CollapseSpecification = 'DocumentSignature: 1' is the recommended approach?

AJIXuMuK avatar Oct 05 '20 19:10 AJIXuMuK

Depends what you want to achieve. If you want all duplicates for a specific item I do not expect CollapseSpecification='DocumentSignature: 1' to work as that will return one doc per signature.

And duplicate trimming on the default signature is also "evil", and we don't use in OOB Microsoft Search.

Can you clarify the issue a bit more?

I think perhaps the text "TrimDuplicatesOnProperty or CollapseSpecification is set to false." is wrong and should say "not set" instead of "false". Agree that that is the "bug"?

wobba avatar Oct 05 '20 19:10 wobba

@wobba the use case is get duplicates for a single document, yes.

For that I was using CollapseSpecification=false. And that worked. But stopped working in SPO probably few weeks ago (can't tell the exact timeframe). After trying different combinations, setting CollapseSpecification='DocumentSignature: 1' seems to work. So, instead of

TrimDuplicatesIncludeId = <id>
CollapseSpecification = false

I have

TrimDuplicatesIncludeId = <id>
CollapseSpecification = 'DocumentSignature: 1'

If I leave CollapseSpecification unset, it just returns the whole result set, without TrimDuplicatesIncludeId filtering.

So, I would say, CollapseSpecification = false should be changed to CollapseSpecification='DocumentSignature: 1' in the docs.

Let me know if there is other approach I could use.

AJIXuMuK avatar Oct 05 '20 19:10 AJIXuMuK

Afaik CollapseSpecification should never have a value of "false". I'll take a pass at proposing the proper change to the docs once I get it working. When I specify TrimDuplicates=true and trimduplicatesincludeid=<id> I would expect to get all duplicated + original of that one file.

Seems the setting to provide an id has no effect at all.

CollapseSpecification='DocumentSignature:1' is the same as setting TrimDuplicates=true. Keep one item when the signature matches. trimduplicatesincludeid is about getting all the duplicates.

I tried in classic to enable Show View Duplicates link but cannot see the link showing, so need to investigate a bit more.

wobba avatar Oct 08 '20 12:10 wobba

Any update on this ?

puthurr avatar Dec 01 '21 12:12 puthurr

@wobba When I specify TrimDuplicates=true and trimduplicatesincludeid=id I would expect to get all duplicated + original of that one file, but this is not happening, search result has no impact of trimduplicatesincludeid=id. I also tried providing CollapseSpecification='DocumentSignature:1' together with the above 2 properties but it has NO effects.

I don't see any update of this bug since 1 year. Is this bug is still not resolved?

neelammourya avatar Dec 01 '21 14:12 neelammourya

@wobba At this time any mentioning of TrimDuplicatesIncludeId with value in search returns "An unknown error occurred." Tried it on multiple production and demo tenants. image_2022_05_14T15_08_59_150Z

sharepointalist avatar May 14 '22 15:05 sharepointalist

I don't have details but could be that TrimDuplicatesIncludeId is deprecated without a message as it hasn't worked for long while.

wobba avatar May 20 '22 16:05 wobba

@wobba Anyway to confirm this depreciation? We have a feature in our app that this relies on, and we would need to deprecate it in this case...

sharepointalist avatar May 24 '22 20:05 sharepointalist

We are testing this internally and will share details when we have an ETA for production. Parameter is not deprecated.

wobba avatar Sep 15 '22 18:09 wobba

We identified a case around TrimDuplicatesIncludeId which we have to look closer into.

wobba avatar Oct 31 '22 11:10 wobba

@wobba any news on the issue with TrimDuplicatesIncludeId? It is still not working...

sharepointalist avatar May 04 '23 21:05 sharepointalist