tag:blogger.com,1999:blog-3323891144353318207.post4848402718642316234..comments2024-03-13T08:04:46.236-04:00Comments on SteveMann's Path: SharePoint 2013: Allowing Users to Sort Search ResultsSteve Mannhttp://www.blogger.com/profile/07380496759963407882noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-3323891144353318207.post-75081577569948503152016-08-18T14:22:22.077-04:002016-08-18T14:22:22.077-04:00configure the sorting within the search results We...configure the sorting within the search results Web part query (Change Query button). but then changing the sort drop down may not work as expected if you select last name. Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-27107058223250132782016-08-16T22:52:10.602-04:002016-08-16T22:52:10.602-04:00Hi Steve, How do you get it to sort by First Name ...Hi Steve, How do you get it to sort by First Name then Last Name - at present it shows Bob Smith above Bob Andrews.<br /><br />Code is currently as follows: [{"name":"First name (A-Z)","sorts":[{"p":"FirstName","d":0}]},{"name":"First name (Z-A)","sorts":[{"p":"FirstName","d":1}]},{"name":"Last name (A-Z)","sorts":[{"p":"LastName","d":0}]},{"name":"Last name (Z-A)","sorts":[{"p":"LastName","d":1}]}]Anonymoushttps://www.blogger.com/profile/07008731396096322939noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-60136018064482296742015-11-26T09:41:54.340-05:002015-11-26T09:41:54.340-05:00One may use {searchTerms} and one may use {searchB...One may use {searchTerms} and one may use {searchBoxQuery}. Technically both should sort but sometimes there are unexplainable things in SharePoint. There could be a conflict with the query builder configuration within the Web part.Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-37424058405021534562015-11-26T04:01:32.521-05:002015-11-26T04:01:32.521-05:00Hi Steve
Just came across your article and though...Hi Steve<br /><br />Just came across your article and thought you might be the right person for my query.<br /><br />I have a custom result source with no sorting and if show dropdown is checked, the dropdown appears but selecting any default options like modified date(Ascending) doesnt work.<br /><br />But if i copy the query from the result source directly on the webparts query builder dropdown selection sorts the resutls as expected.<br /><br />Any clues?<br /><br />thanks<br />deepthideepthinoreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-76588000060290180642015-09-09T12:59:29.463-04:002015-09-09T12:59:29.463-04:00You would need to add the file type property to th...You would need to add the file type property to the sort JSON. Also, you would need to make sure that property is set to Sortable. The property is used in the refinements so you can look at that web part configuration to find the proper property. I am on vacation this week so I can't look into that at the moment. <br /><br />I can personally assist you online if needed through my tutoring account: https://www.wyzant.com/Tutors/stevetheman<br />Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-52598056645139555072015-09-08T11:52:40.951-04:002015-09-08T11:52:40.951-04:00Hello Steve, not sure if my last post went through...Hello Steve, not sure if my last post went through, so please forgive me for asking twice. How can we sort by file type? For example, I want all pages, or all PDF's, or all Word Documents? How easy would it be to set this up from the front-end of SharePoint? Thanks!klphttps://www.blogger.com/profile/03494992148837550700noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-11982355400017672152015-03-26T06:47:25.218-04:002015-03-26T06:47:25.218-04:00We're in the same position, did you find a res...We're in the same position, did you find a resolution?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-47429609858999768312015-03-20T08:14:41.743-04:002015-03-20T08:14:41.743-04:00The sort entries should all match to the managed p...The sort entries should all match to the managed properties within the search schema. It doesn't matter what the internal name is behind the scenes.Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-73559043116929583622015-03-19T10:12:18.607-04:002015-03-19T10:12:18.607-04:00Try using Title for the sort. Contact content type...Try using Title for the sort. Contact content types rename Title to Last Name, but the internal name of the column is still Title, and the JSON probably needs to see Title in order to sort on it. (This applies to the similar question above from rogpodge as well.)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-22088050249866437522013-12-09T11:29:20.237-05:002013-12-09T11:29:20.237-05:00I did all of that and no luck in sorting of the la...I did all of that and no luck in sorting of the last name.IGotYourDotnethttps://www.blogger.com/profile/05232237370956834898noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-39451014746186083602013-11-21T15:09:27.830-05:002013-11-21T15:09:27.830-05:00Make sure in the JSON, it is capital L and capital...Make sure in the JSON, it is capital L and capital N. Run a full crawl after changing the sort property. Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-41348136884256661822013-11-21T09:17:13.232-05:002013-11-21T09:17:13.232-05:00I'm having a similiar issue as everyone else, ...I'm having a similiar issue as everyone else, I can sort on firstname and departments, however when I do a sort on last name I'm getting an error message:<br />ttribute vector 'LastName' not available for sorting:<br /><br />and when I go into the Search Schema in CA, the LastName property is set to Sortable=yes:activeIGotYourDotnethttps://www.blogger.com/profile/05232237370956834898noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-64455912748076181202013-11-18T09:38:37.421-05:002013-11-18T09:38:37.421-05:00If you want to use the sorting options in the &quo...If you want to use the sorting options in the "Change Query" dialog and not use the sort drop-down you can just set the JSON property to an empty array: []<br />If you save that, then come back in and uncheck the box to show the sort drop-down, then you can change the sort order from the nice dialog screen! You have to have [] in there otherwise something gets screwed up and you can't sort from the dialog window.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-14194207659467891992013-11-06T14:44:25.702-05:002013-11-06T14:44:25.702-05:00You would need both a custom user profile property...You would need both a custom user profile property and search property. There may be a better hack for this but I've done it this way with Bdc/Bcs sort issues.Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-60886244822663733732013-11-06T14:18:39.706-05:002013-11-06T14:18:39.706-05:00I'm assuming you are referring to creating a n...I'm assuming you are referring to creating a new search managed property and not a user profile property? <br /><br />What I can't figure out is how to transform the crawled property to all Caps. I do see a Token Normalization option in the managed property, but that looks like it's only relevant for search queries and it's already enabled in the LastName managed property.<br />hurnahttps://www.blogger.com/profile/03289077703491488709noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-23095600318432099892013-11-06T13:26:03.492-05:002013-11-06T13:26:03.492-05:00Create a SortLastName property and populate that w...Create a SortLastName property and populate that with the LastName in all caps. Then use that as the sort property. Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-24211932343872649412013-11-06T12:30:50.163-05:002013-11-06T12:30:50.163-05:00We are setting up a people listing and adding sort...We are setting up a people listing and adding sort by first and last name. We made last name sortable and did a full crawl. What we found is the sort is actually case sensitive, which does not work well for last names. So all uppercase letters come first, then lower case letters. So the last name de Hoya for example, actually comes after the last name Zylo. Is there anyway to make the sort non case-sensitive? <br /><br />Here's the JSON we are using:<br />[{"name":"First name (A-Z)","sorts":[{"p":"FirstName","d":0}]},{"name":"First name (Z-A)","sorts":[{"p":"FirstName","d":1}]},{"name":"Last name (A-Z)","sorts":[{"p":"LastName","d":0}]},{"name":"Last name (Z-A)","sorts":[{"p":"LastName","d":1}]}]hurnahttps://www.blogger.com/profile/03289077703491488709noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-16166162525951265642013-08-15T00:17:30.558-04:002013-08-15T00:17:30.558-04:00I'm having the same issue. I mapped Refinable...I'm having the same issue. I mapped RefinableString00 to the same crawled properties as the LastName mapped property. Sort results by last name come out in random orderAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-24030933381379171672013-07-26T15:36:09.224-04:002013-07-26T15:36:09.224-04:00Did you run a full crawl after you changed the Las...Did you run a full crawl after you changed the LastName property to Sortable?Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-47082750676710871962013-07-25T20:21:37.178-04:002013-07-25T20:21:37.178-04:00Send me the JSON and I'll look.Send me the JSON and I'll look. Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-66413049004757507022013-07-25T12:20:22.595-04:002013-07-25T12:20:22.595-04:00Hey,
I thought I'd ask, since I've been th...Hey,<br />I thought I'd ask, since I've been through this backwards and forwards:<br />I am using the same sorting JSON as above, and the two First Name sorts work fine, but both Last Name sorts do not.<br />I don't get an error, since the Last Name property is marked sortable, it just seems to be a random sort that is not based on alpha, social distance, dept, etc, but definitely not Last Name.<br />Any ideas? Thanks!Kaceykasohttps://www.blogger.com/profile/17326940021481755106noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-60818081335290656022013-03-31T11:57:27.734-04:002013-03-31T11:57:27.734-04:00Also, after you make a change on the managed prope...Also, after you make a change on the managed property, you need to perform a full crawl to have it take effect.Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-88546836914220583112013-03-31T11:56:40.761-04:002013-03-31T11:56:40.761-04:00You have it set to "Sortable", correct? ...You have it set to "Sortable", correct? Is the property named LastName or Lastname? I'm pretty sure it is case sensistive.Steve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-27313383025926643122013-03-27T14:57:34.493-04:002013-03-27T14:57:34.493-04:00Yes thank you! I was going to update this post wit...Yes thank you! I was going to update this post with a note. You can't just stick any managed property into the JSON. It must be a managed property that has been marked as "sortable". You will receive an error when if you try to select a non-sortable property.<br /><br />-=SteveSteve Mannhttps://www.blogger.com/profile/07380496759963407882noreply@blogger.comtag:blogger.com,1999:blog-3323891144353318207.post-37878011902083170862013-03-27T14:13:22.865-04:002013-03-27T14:13:22.865-04:00It tuns out there is a "Sortable" checkb...It tuns out there is a "Sortable" checkbox that needs to be checked in the Search Schema Managed Properties for each item to make it available for sorting.rogpodgehttps://www.blogger.com/profile/07934247239116916821noreply@blogger.com