Gravatar for coveoadmins@cir2.com

Question by CambridgeAdmins, Nov 10, 2016 4:16 PM

Combine Text and Web Pages in Facet

Is it possible to combine the values of Text, and Web Pages in the Type facet? Some of our SharePoint files show up as both web pages, and text files. Our leadership sponsors want all web pages (html, wiki pages, aspx, anything considered a webpage) to be grouped together as one in the Type facet to make it easier for our users.

In the admin tool, I removed .txt from the Text group, and added it to the Web Pages group for document types. I then did a rebuild on all sources. However, nothing changed. They still show up as different values in the facet.

Is this something that can be done? Any assistance would be greatly appreciated. Thank you, and have a great day!

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Nov 11, 2016 9:25 AM

Hi,

It is not possible to merge facet values in the UI. The merge should be done prior to the documents being indexed. Your Type facet uses a specific field (maybe it is @systype or another one). So it lists all the values of this field on your various indexed documents.

What you should do is to define a new custom field on your documents and fill it with the desired value (same as the @sysfiletype field for most documents but a fixed value identical for both text and web pages documents). To do this, you might need to code some post conversion scripts and assign them to your sources.

Then, you can switch your type facet to use that new field instead of the default one.

I hope this helps,

Jeff

Gravatar for coveoadmins@cir2.com

Comment by CambridgeAdmins, Mar 8, 2017 3:15 PM

So, does that mean that if we add everything such as (.html , .txt , .aspx , etc.) to the webpage document type, then it will show up properly if we re-index our sources?

Or, can it only be done with a conversion script?

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Mar 8, 2017 4:17 PM

It can only be done with a conversion script. It has nothing to do with the document type sets.

Ask a question