← Al Davies, 250 High Street

SharePoint KQL search syntax

As of November 2026, a SharePoint KQL query is made of free-text words or phrases, property restrictions, and the operators that join them. Microsoft's reference calls the language KeyQL; operators such as AND, OR and NOT must be uppercase, while the query itself is case-insensitive.

How do words and phrases behave?

Several words with no operator between them behave as if joined by AND. A phrase needs double quotation marks, and then only items with the words next to each other match.

Words match exactly against the full-text index. A trailing wildcard (*) gives prefix matching. Microsoft says a wildcard cannot lead a word or phrase.

What do property restrictions look like?

QueryReturns
author:"John Smith"Items authored by John Smith
filetype:docxWord documents
filename:budget.xlsxItems with the file name budget.xlsx

Why does a space break a restriction?

A property restriction must have no white space between the name, the operator and the value. With a space, as in author: "John Smith", SharePoint reads it as free text and searches for the terms author and John Smith.

Which operators join terms?

OperatorWhat it doesExample
AND or +Both terms must matchbudget AND 2026
OREither term can matchTV OR television
NOT or -Leaves out a termbudget NOT draft
NEAR(n)Terms within n words, in any order. Default 8"acquisition" NEAR(n=3) "debt"
ONEAR(n)Same as NEAR, but the order must match"acquisition" ONEAR "debt"
WORDSTreats terms as synonyms for rankingWORDS(TV, Television)

Which operators work on properties?

The colon and equals operators match values. Less than, greater than, their or-equal forms, and a range written A..B work on date and number properties. The not-equal operator (<>) also works on text. The range includes both ends.

Which date words can you use?

How do you group a property?

Parentheses can hold several values for one text property, as in author:("John Smith" "Jane Smith"). Microsoft says grouping can match more items, because individual words are lemmatized. Add NOT to find items with an empty property, as in NOT Property:*.

When search returns nothing

To restrict on a crawled property, Microsoft says it must first be mapped to a managed property. If results are missing, read SharePoint search not finding documents. For library structure that makes search easier, see document management best practices.

FAQ

Is KQL case-sensitive?

The query text is not. Operators like AND, OR and NOT must be uppercase.

How long can a query be?

In the default SharePoint search front end the limit is 2,048 characters. Programmatic queries default to 4,096.

Can I put a wildcard at the start?

No. Microsoft says a leading wildcard is not supported.

How do I search a date range?

Use the .. operator on a date property. A..B includes both A and B.

What is the difference between NEAR and ONEAR?

NEAR matches terms close together in any order. ONEAR needs them in the order you typed.

Do date keywords like today work?

Yes. Microsoft lists today, yesterday, this week, this month, last month, this year and last year.

Can I find items where a property is empty?

Yes. For queryable text properties, use NOT followed by the property name and a colon with an asterisk.

Does a space after the colon matter?

Yes. With a space, SharePoint treats it as free text, not a property restriction.

Sources