Understanding Search Possibilities in SharePoint Server
This EPC Group blog outlines the various ways to customize the search parameters of SharePoint and includes details on the following methods of SharePoint’s search capabilities:
- Proximity Search
- Boolean Search
- Complex Queries
- KQL – Keyword Query Language
- Search Web Parts
- Wild Card Search
- Numeric Search
- Relevance Search
Proximity Search in SharePoint
SharePoint allows the use of proximity operators to match the results where specified search terms are within close proximity to each other. Supported Proximity Operators are listed here:
- NEAR
- Words near each other in any order
- John NEAR Smith
- Hon Near(n=3) Smith
- Words near each other in any order
- ONEAR
- Find words in the same order
- John ONEAR Smith
- John ONEAR(n=2) Smith
- PHRASE
- STARTS-WITH
- ENDS-WITH
- EQUALS
- Find words in the same order
SharePoint 2013’s updates include improvements to the Keyword query language, which are described below:
Improved NEAR operator
In SharePoint Server 2010, the NEAR operator implied a maximum token distance of 8 and preserved the ordering of the input tokens. In SharePoint 2013, the NEAR operator no longer preserves the ordering of tokens. In addition, the NEAR operator now receives an optional parameter that indicates maximum token distance. However, the default value is still 8. If you must use the previous behavior, use ONEAR instead.
The NEAR operator can be used in property restriction expressions, as shown in the following example:
“acquisition” NEAR “debt”
This query matches items where the tokens “acquisition” and “debt” appear within the same document, with a maximum token distance of 8 (which is the default value of n if no value is provided). The order of the tokens is not significant for the match.
If you require a smaller token distance, you can specify it as follows:
“acquisition” NEAR(n=3) “debt”
This query matches items where the two tokens “acquisition” and “debt” appear within the same document, with a maximum token distance of 3. The order of the tokens is not significant for the match.
New ONEAR operator
The ONEAR operator provides ordered near functionality. It receives an optional parameter that indicates maximum token distance; the default value is 8.
The ONEAR operator preserves the order of the input expressions. For unordered proximity, use NEAR.
You can use the ONEAR operator in property restriction expressions, as shown in the following example:
“acquisition” ONEAR “debt”
This query matches items where the two tokens “acquisition” and “debt” appear within the same document, with a maximum token distance of 8(which is the default value of n if no value is provided). The order of the tokens must match for an item to be returned.
If you require a smaller token distance, you can specify it as follows:
“acquisition” ONEAR(n=3) “debt”
This query matches items where the two tokens “acquisition” and “debt” appear within the same document, with a maximum token distance of 3. The order of the tokens must match for an item to be returned.
New XRANK operator
In SharePoint Server 2010, the XRANK operator was available only with FAST Query language (FQL). SharePoint 2013 introduces a new and powerful XRANK operator.
The XRANK operator provides dynamic control of ranking. This operator boosts the dynamic rank of items based on the occurrence of certain terms without changing items that match the query.
Boolean Search in SharePoint
- Boolean search in SharePoint supports different operators. This operators are as follows:
- AND (+)
- OR
- ANY
- ANDNOT
- NOT (-)
- COUNT
TIPS:
- Operators must be in CAPS
- Use “Quotes” for exact Phrases
- Operator is “AND” by default
KQL – Keyword Query Language in SharePoint
KQL Power Queries are one of the most powerful elements for refinement and examples are listed below:
Examples:
- Author
- Author:will
- Author:”William Sha*”
- File Type (exact)
- FileType:pdf
- File Name (contains)
- FileName:File
- Title Of document
- Title:Marketing
- Last Modified YYYY-MM-DD
- Lastmodifiedtime:2014-11-7
- Last Modified (Date Range)
- Lastmodifiedtime=2014-10-1..2014-11-6
Complex Queries in SharePoint
- Use Parenthesis to choose ORDER of execution.
- For Ex. Author: “John St*” (mice OR men)
Search Web Parts Available in SharePoint
Refine search with Web Parts in SharePoint:
Wild Card Search
- You can use wildcard Operator – the asterisk character (“*”) – to enable prefix matching.
- You can specify part of a word, from the beginning of the word, followed by the wildcard operator, in your query, as follows:
- Author:”John Sm*”
- micr* AND share*
Numeric Search
Enables you to specify numeric conditions in the query. Numeric operators are as follows:
- RANGE
- INT
- FLOAT
- DATETIME
- DECIMAL
Relevance Search
Enables you to impact the relevance evaluation of a query. Supported Operators are as follows:
- XRANK
- FILTER
With over 25 years of experience in Information Technology and Management Consulting, Errin O’Connor has led hundreds of large-scale enterprise implementations from Business Intelligence, Power BI, Office 365, SharePoint, Exchange, IT Security, Azure and Hybrid Cloud efforts for over 165 Fortune 500 companies.
Talk to our Microsoft Gold Certified Consultants
Contact EPC Group
Call for help:
Email Us:
Head Office:
4900 Woodway Drive - Suite 830 Houston, Texas 77056