Others

Fix SharePoint Online Search Ignoring Query Transform and Sort Order

Muhammad TalhaMuhammad Talha Oct 29, 2026 869 views

Question details

Users need to fix an issue where Modern SharePoint search does not apply customized result sources, query transforms, date filters, or sorting rules correctly.

How to Fix SharePoint Online Search Ignoring Query Transform and Sort Order
Product
SharePoint Online
Device & OS
not provided
Scenario
Searching for specific documents using customized queries, date filters, or LastModifiedTime sort orders in a Modern SharePoint site.
Observed behavior
Modern SharePoint search ignores the custom query transform and sorting rules, sometimes displaying unexpected or older results that would normally be filtered out in classic search.
Before you start

Verify your SharePoint site permissions, as managing Result Sources and adding custom web parts requires Site Collection Administrator privileges.

Solution 1Recommended

Implement PnP Modern Search Web Parts

Bypass the limitations of built-in Modern Search by deploying PnP Search web parts, which fully support custom query transforms and sorting.

The default Modern Search experience in SharePoint restricts deep customization and often overrides custom result sources. Deploying PnP Modern Search Web Parts allows you to regain the granular control found in Classic Search.

1
Download PnP Search

Navigate to the official Microsoft PnP Modern Search GitHub repository and download the latest release package.

2
Deploy to App Catalog

Upload the downloaded package to your SharePoint Tenant App Catalog to make the web parts available across your sites.

3
Add Web Part to Page

Edit your Modern SharePoint page, click the '+' icon to add a new element, and select the 'PnP - Search Results' web part.

4
Configure Query Transform

Open the web part properties pane, enter your custom query transform syntax, and configure the desired LastModifiedTime sort order.

Implement PnP Modern Search Web Parts
Advanced Customization Restored: PnP web parts provide complete control over search result rendering, refiners, and backend query formulation on Modern sites.
Free Microsoft Office alternative

Looking for a Hassle-Free Office Suite? Try WPS Office

SharePoint search configurations can be highly complex. For an easier way to handle your daily document tasks, WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office, letting you edit files locally without a steep learning curve.

  1. 1. Download and Install: Visit the official WPS website to download the free suite and follow the simple installation prompts.
  2. 2. Open Your Files: Launch WPS Office and open your existing Microsoft Word, Excel, or PowerPoint documents natively.
  3. 3. Edit Seamlessly: Enjoy a familiar interface to edit, format, and save your work with complete format compatibility.
Fully compatible with Microsoft Office formats like DOCX, XLSX, and PPTX.Lightweight software that installs quickly and runs smoothly on older devices.Familiar user interface for seamless migration and zero learning curve.All-in-one suite to manage documents, spreadsheets, presentations, and PDFs natively.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Modern SharePoint Search ignore my custom result sources?

Modern SharePoint Search is designed with simplified built-in configurations to improve general performance and often overrides custom result sources, query transforms, or specific LastModifiedTime sortings. Classic search relies on an older, fully customizable search architecture.

What are PnP Search web parts?

PnP (Patterns and Practices) Search web parts are open-source, Microsoft-supported community extensions for SharePoint Online. They restore advanced search capabilities to Modern pages, allowing you to use custom queries, refiners, and precise sorting.

How do I check if my date filter is actually working in SharePoint?

You can test the exact search query in a Classic Search center. If the date filter and sorting work correctly there but fail on a Modern site, the issue is specific to the Modern UI's search limitations rather than your query syntax.

When should I contact Microsoft 365 Support for search issues?

If you have verified your query in both classic and modern search and still see unexpected older results that explicitly violate your query transform rules, there may be a backend indexing anomaly. In this case, your tenant administrator should open a support ticket.