If you’re a SharePoint developer like me, you probably find the Query Throttle in SharePoint an absolute pain. This is a feature where, under an unnecessarily complicated set of conditions, if you try to ask for too many list items in one query, SharePoint refuses.
Now, while I understand why such a limit is necessary – albeit I’d rather it was simpler – it is something of a problem. For example, multi-choice columns cannot be indexed. If you want to query such a column, and there are more than 5000 items in the list, we’ll, you’re outta luck.
That situation is surprisingly common in Document Management systems.
Over the years my colleagues and I have taken to using SharePoint’s search in such scenarios. There are trade-offs – search latency, having to develop your own UI, etc. – but it works, and we can’t be the only ones doing this – there was a codeplex project for this in 2010.
Fine, it works nicely. Except when you’re using Office 365. Then there are some limitations. Hidden away in this page are two quite serious ones:
In SharePoint Online, when you create a new managed property, it will have some limitations. For example, the property can only be of type Text or Yes/No, and it can’t be refinable or sortable.
Yup, no sorting for you, and no refinement panel goodness. And no search queries against date ranges. You can potentially search for a particular date, but not ‘between 1st Feb and 23rd March’.
And that’s a real shame – that kind of advanced query against metadata in SharePoint is powerful. To me, it’s what sets SharePoint search apart from a, dare I say it, more Google-like search. Sorting and refining is something that excites customers, ‘cos it helps them find their content. I get that there are probably technical (i.e. performance) reasons that these options aren’t available, but it does make O365 search feel hamstrung. I do hope that these limitations will be removed in the future.
And for now, I’ll try and avoid having requirements that involve using search (to avoid query throttling, for example) and sorting my results.