Question

I have a content search web part that is displaying a bunch of things from a cross-site publishing catalog. That is working just fine.

But I would like to sort the items in alpha order. I would have thought Edit web part > Query builder > switch to advanced view > sorting tab > sort by > title (or name). But in the sort by drop down there is no title or name to select.

If I wanted to sort by author or created date I'm covered, but no title?

Was it helpful?

Solution

So here is the answer I figured out. It is sort of an all-or-nothing way, but it seems to work. Not sure if it has downsides yet....

On the authoring side I went into the Search Schema and mapped Basic:displayTitle to one of the RefinableString managed properties. Then I did a reindex of my catalog list.

After that happened I went to the publishing side and into the Search Results Source and found the result source for my connected managed catalog. I went to its sort tab and added the RefinableString as the sort order.

Still a couple of problems. it looks like it sorts the lowercase letters before/after all the upper case ones. So A-Za-z, not AaZz. Any ideas on that?

OTHER TIPS

Modify the existing managed property "Title" and select the option to make it Sortable. Then run a full crawl. It will be easier to identify the Title field rather than reuse a RefinableString or create your own managed property. After the full crawl is complete, you should be able to select Title as a sortable property in the web part.

SJNBham answered the question but here are the instructions for dummies like me. You'll need access to Central Administration/Search Administration.

  • Central Administration > Search Administration > Search Scheme
  • In the Managed property filter search for "Title"
  • Select Title > Edit/Map Property
  • Change Sortable to Yes (Two options here, choose one that works for you) > OK
  • Run Full Crawl
  • Select Title as a sort in the Content Search Web Part

If you are is an Office 365 context, it's impossible to change existing managed properties in order to make it sortable. The only way is by using one of the RefinableStringXX proprties (that are Sortable by default).

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top