{"id":205,"date":"2020-02-17T16:42:43","date_gmt":"2020-02-17T15:42:43","guid":{"rendered":"https:\/\/help.metashare.com\/metashare-help-user-manual-how-to-use-advanced-search\/"},"modified":"2025-02-06T16:32:03","modified_gmt":"2025-02-06T15:32:03","slug":"how-to-use-advanced-search","status":"publish","type":"page","link":"https:\/\/help.metashare.com\/en\/metashare\/usermanual\/find-documents\/how-to-use-advanced-search\/","title":{"rendered":"How to use advanced search"},"content":{"rendered":"\n<p>To&nbsp;get more relevant search suggestions, you can either narrow down your search results using wildcards or search using Boolean or\/or relationship operators. These are described below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Search with wildcards<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>You can use asterisk (*) to search for parts of words.<\/li>\n\n\n\n<li>* must be used at the end of a word, not in the beginning.\n<ul class=\"wp-block-list\">\n<li>micro* finds documents that contain Microsoft or microchip.<\/li>\n\n\n\n<li>*soft does NOT find documents containing Microsoft. <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>By combining * with quotation marks, the search becomes more efficient, for example, &#8220;Johan An*&#8221; gives more relevant hits than Johan An*.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Search with Boolean operators<\/h2>\n\n\n\n<p>All logical expressions (AND, OR, NOT, NEAR, ONEAR) must be written in uppercase, otherwise they are assumed to be normal search phrases. Examples of the most common logical operators:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>AND<\/strong> or <strong>+<\/strong><br>Finds all the matches that have the first AND the second word (the order of the words is of no importance).<br>Syntax: phrase1 <strong>AND<\/strong> phrase2<br>Syntax 2: phrase1 <strong>+<\/strong> phrase2<\/li>\n\n\n\n<li><strong>OR<\/strong><br>Finds all the matches that have the first OR the second word (the order of the words is of no importance).<br>Syntax: phrase1 <strong>OR<\/strong> phrase2<\/li>\n\n\n\n<li><strong>NOT<\/strong> or <strong>&#8211;<\/strong><br>Finds all the matches that have the first but NOT the second word (the order of the words are important).<br>Syntax 1: phrase1 <strong>NOT<\/strong> phrase2<br>Syntax 2: phrase1 <strong>&#8211;<\/strong>phrase2 (note that there should be no space between the minus character and the phrase)<\/li>\n\n\n\n<li><strong>(<\/strong> and <strong>)<\/strong><br>To make more advanced searches, parentheses can be used, just as in mathematics world.<br>Example: <strong>(<\/strong>SharePoint AND Document Management<strong>) NOT (<\/strong>Extranet AND Intranet<strong>)<\/strong><\/li>\n\n\n\n<li><strong>NEAR<\/strong><br>Finds all the matches where the first AND the second word are close to each other (the order of the words is of no importance).<br>Syntax 1: phrase1 <strong>NEAR<\/strong> phrase2<br>Syntax 2: phrase1 <strong>NEAR(n=X)<\/strong> phrase2, where X is the number of words apart. If no n is specified then the default value of X is 8.<\/li>\n\n\n\n<li><strong>ONEAR<\/strong><br>Finds all the matches where the first AND the second word are close to each other and that the first word comes before the other.<br>Syntax 1: phrase1 <strong>ONEAR<\/strong> phrase2<br>Syntax 2: phrase1 <strong>ONEAR(n=X)<\/strong> phrase2 where X is the number of words apart. If no n is specified then the default value of X is 8.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Search with relationship operators<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Relationship operators can be used on document properties (metadata):\n<ul class=\"wp-block-list\">\n<li><strong>:<\/strong> (contains)<\/li>\n\n\n\n<li><strong>=<\/strong> (equal to)<\/li>\n\n\n\n<li><strong>&lt;&gt;<\/strong> (not equal to)<\/li>\n\n\n\n<li><strong>&lt;<\/strong> (less than, e.g. a date or number)<\/li>\n\n\n\n<li><strong>&gt;<\/strong> (greater than, e.g. greater than a date or number)<\/li>\n\n\n\n<li><strong>&lt;=<\/strong> (less than or equal to, e.g. a date or number)<\/li>\n\n\n\n<li><strong>&gt;=<\/strong> (greater than or equal to, e.g. a date or number)<\/li>\n\n\n\n<li><strong>..<\/strong> (between values, e.g. dates or numbers)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>No spaces may be used between the document properties, the operator, and the search phases.<\/li>\n\n\n\n<li>Relationship operators can be combined with logical, for example:<br>(\u201cwind power\u201d OR \u201csolar cells\u201d) AND (title:innovations OR title:technician)<\/li>\n<\/ol>\n\n\n\n<p>Here is a list of the most common predefined document properties and they can all be used directly without any configuration:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Document property<\/th><th>SharePoint\u2019s predefined search property<\/th><th>Example<\/th><th>Comments<\/th><\/tr><\/thead><tbody><tr><td>Created by<\/td><td>CreatedBy<\/td><td>createdby:\u201djohn smith\u201d<\/td><td>Who created\/uploaded the documents.<\/td><\/tr><tr><td>Modified by<\/td><td>ModifiedBy<\/td><td>modifiedby:\u201djohn smith\u201d<\/td><td>Who last edited the documents.<\/td><\/tr><tr><td>Created<\/td><td>Created<\/td><td>created&gt;2013-02-14<\/td><td>When the documents were created.<\/td><\/tr><tr><td>Modified<\/td><td>LastModifiedTime<\/td><td>lastmodifiedtime&gt;2013-02-14<\/td><td>When the documents were last edited.<\/td><\/tr><tr><td>Document name<\/td><td>Filename<\/td><td>filename:agenda<\/td><td>NOTE: the file extension is not required!<\/td><\/tr><tr><td>File type<\/td><td>Filetype<\/td><td>filetype:pptx<\/td><td><\/td><\/tr><tr><td>Author<\/td><td>Author<\/td><td>author:\u201cjohn smith\u201c<\/td><td>The documents\u2019 author (not the same as created by or modified).<\/td><\/tr><tr><td>File size<\/td><td>Size<\/td><td>size&gt;1000000<\/td><td>Note: defined in bytes!<\/td><\/tr><tr><td>Title<\/td><td>Title<\/td><td>title:protocol<\/td><td>The documents\u2019 title (not their filenames\/ document names).<\/td><\/tr><tr><td>Content type<\/td><td>SPContentType<\/td><td>SPContentType=&#8221;Financial document&#8221;<\/td><td><\/td><\/tr><tr><td>Path<\/td><td>Path<\/td><td>path:&#8221;https:\/\/contoso-my.sharepoint.com&#8221;<\/td><td>The documents&#8217; path, in the example on the left, only showing documents that are stored in OneDrive.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>All custom properties can also be used within the search, but they must first be <a href=\"https:\/\/help.metashare.com\/en\/metashare\/faq\/search\/how-to-configure-managed-properties\/\">configured in the search engine<\/a>. If you however want to search for custom properties before configuring the search engine, you can do so using this syntax:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>For text fields (e.g. managed metadata, single line of text, people or group &amp; choice) you can search using this syntax &#8220;owstaxId&lt;Column&#8217;s internal name&gt;&#8221;, e.g. &#8220;owstaxIdDocumentType&#8221; if the internal name of a column is &#8220;DocumentType&#8221;.<\/li>\n\n\n\n<li>For date fields you can search using this syntax: &#8220;&lt;Column&#8217;s internal name&gt;OWSDATE&#8221;, e.g. &#8220;ReviewDateOWSDATE&#8221; if the internal name of a column is &#8220;ReviewDate&#8221;.<\/li>\n\n\n\n<li>For people and group fields you can search using this syntax: &#8220;&lt;Column&#8217;s internal name&gt;OWSUSER&#8221;, e.g. &#8220;InformationOwnerOWSDATE&#8221; if the internal name of a column is &#8220;InformationOwner&#8221;.<\/li>\n\n\n\n<li>For Boolean fields you can search using this syntax: &#8220;&lt;Column&#8217;s internal name&gt;OWSBOOL&#8221;, e.g. &#8220;ContainsSensitiveDataOWSBOOL&#8221; if the internal name of a column is &#8220;ContainsSensitiveData&#8221;.<\/li>\n\n\n\n<li>For Choice fields you can search using this syntax: &#8220;&lt;Column&#8217;s internal name&gt;OWSCHCS&#8221;, e.g. &#8220;ColourOWSCHCS&#8221; if the internal name of a column is &#8220;Colour&#8221;.<\/li>\n\n\n\n<li>For Number fields you can search using this syntax: &#8220;&lt;Column&#8217;s internal name&gt;OWSNMBR&#8221;, e.g. &#8220;AgeOWSNMBR&#8221; if the internal name of a column is &#8220;Age&#8221;.<\/li>\n<\/ol>\n\n\n\n<p>In the examples above, the internal name might need to be xml-encoded. If the internal name has special characters, e.g. &#8220;Document_x0020_type&#8221;, then decode it to &#8220;Document type&#8221; and then remove these special characters: !@#$%^_+=,{}~&amp;()` and spaces. So in this case, the cleaned up internal name will be &#8220;Documenttype&#8221;. In some cases you may also need to use &#8221; &#8221; around the value. See this page for additional information about this: <a href=\"https:\/\/learn.microsoft.com\/en-us\/sharepoint\/technical-reference\/automatically-created-managed-properties-in-sharepoint\" target=\"_blank\" rel=\"noreferrer noopener\">Automatically created managed properties in SharePoint<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Search using date and time<\/h3>\n\n\n\n<p>For a simple date search, it is enough to search for dates using this format: &#8220;YYYY-MM-DD&#8221;, e.g.:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>created=2020-02-01<\/code><\/pre>\n\n\n\n<p>where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>YYYY specifies a four-digit year<\/li>\n\n\n\n<li>MM specifies a two-digit month (01 = January through 12 = December)<\/li>\n\n\n\n<li>DD specifies a two-digit day of the month (01 through 31)<\/li>\n<\/ul>\n\n\n\n<p>You can also create dynamic date searches using relative words such as &#8220;today&#8221; and &#8220;this year&#8221;. These can be good to have when bookmarking today&#8217;s created documents. These are the names of these date intervals:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>today, e.g. created=today<\/li>\n\n\n\n<li>yesterday, e.g. created=yesterday<\/li>\n\n\n\n<li>this week, e.g. created=&#8221;this week&#8221;<\/li>\n\n\n\n<li>this month, e.g. created=&#8221;this month&#8221;<\/li>\n\n\n\n<li>last month, e.g. created=&#8221;last month&#8221;<\/li>\n\n\n\n<li>this year, e.g. created=&#8221;this year&#8221;<\/li>\n\n\n\n<li>last year, e.g. created=&#8221;last year&#8221;<\/li>\n<\/ul>\n\n\n\n<p>If you want to be more specific you can also add time and time zone, in this format: &#8220;YYYY-MM-DDThh:mm:ss+TZ:00&#8221;, e.g.:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>created=2020-02-01T13:45+01:00<\/code><\/pre>\n\n\n\n<p>where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>T specifies that you want to add a specific time<\/li>\n\n\n\n<li>hh specifies a two-digits hour (00 through 23)<\/li>\n\n\n\n<li>mm specifies a two-digit minute (00 through 59)<\/li>\n\n\n\n<li>ss specifies a two-digit second (00 through 59)<\/li>\n\n\n\n<li>TZ specifies the time zone:\n<ul class=\"wp-block-list\">\n<li>All date\/time values are specified according to the UTC (Coordinated Universal Time), also known as GMT (Greenwich Mean Time) time zone.<\/li>\n\n\n\n<li>If you exclude this part, your search will use the site\u2019s time zone.<\/li>\n\n\n\n<li>If you want to search using a specific time zone then add, at the end of your query, the time <a href=\"https:\/\/www.timeanddate.com\/time\/difference\/timezone\/utc?sort=0&amp;low=c\" target=\"_blank\" rel=\"noopener noreferrer\">difference between UTC and your time zone<\/a>&nbsp;in this format: &#8220;+TZ:00&#8221;, where TZ is the time difference from GMT. In Sweden, e.g. it is: &#8220;+02:00&#8221;, summer time and &#8220;+01:00&#8221;, winter time.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>You can easily find all documents within a certain range using this format: &#8220;created&gt;=YYYY-MM-DD AND created&lt;=YYYY-MM-DD&#8221;, e.g.:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>created&gt;=2020-01-01 AND created&lt;=2020-03-30<\/code><\/pre>\n\n\n\n<p>Or in this format, if you also want to take the Swedish time-zone into consideration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>created&gt;=2020-01-01+01:00 AND created&lt;=2020-03-30+01:00<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Search for documents that have or do not have values in document properties<\/h3>\n\n\n\n<p>To search for documents that have or do not have a value in a certain text type document property (e.g. managed metadata, single line of text, people or group &amp; choice), you can use the wildcard operator.<\/p>\n\n\n\n<p>If you want to search for all documents whose documents property, e.g. title, has a value (not empty), you can search using this syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>title:*<\/code><\/pre>\n\n\n\n<p>If you want to search for all documents whose title do not have a value (is empty), you can search using this syntax:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NOT title:*<\/code><\/pre>\n\n\n\n<p>Or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-title:*<\/code><\/pre>\n\n\n\n<p>For date fields you can e.g. search for all documents that are not larger than a specific date, e.g. 1900-01-01 by using this query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>NOT date&gt;=1900-01-01<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Search for documents that are of a certain content type<\/h3>\n\n\n\n<p>If you want to search for a documents that are of a specific content type you can use SharePoint&#8217;s predefined search property, SPContentType, as described in the section <a href=\"https:\/\/help.metashare.com\/en\/metashare\/usermanual\/find-documents\/how-to-use-advanced-search\/#search-with-relationship-operators\">Search with relationship operators<\/a> above. You can however also search for all documents that are of a content type that inherit from a parent content type. Instead of searching for the parent content type&#8217;s name you need to use the ID of the parent content type and search according to this syntax: ContentTypeId:[ID of content type]*. Note the wildcard at the end.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ContentTypeId:0x01010068B322AF3C401E459F41BAFF19469D61*<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-group has-text-bright-color has-accent-1-background-color has-text-color has-background has-link-color wp-elements-5715d999d759a44a854d1a0508fae595\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<h2 class=\"wp-block-heading has-text-bright-color has-text-color has-link-color wp-elements-d1bac14c5327bf7abb712f1154155733\">Discover MetaShare<\/h2>\n\n\n\n<p>Metadata-centric document management system in Microsoft 365\/SharePoint<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Eliminates annoying gaps in standard SharePoint<\/li>\n\n\n\n<li>Ensures data in SharePoint is well structured<\/li>\n\n\n\n<li>Structures with metadata instead of storing in traditional folders<\/li>\n\n\n\n<li>Centralized and simplified administration<\/li>\n\n\n\n<li>Orchestration\/provisioning of settings<\/li>\n\n\n\n<li>Refined Enterprise search<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/metashare.com\/en\/demo\/\">See demo<\/a><\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>To&nbsp;get more relevant search suggestions, you can either narrow down your search results using wildcards or search using Boolean or\/or relationship operators. These are described below. Search with wildcards Search with Boolean operators All logical &#8230; <a title=\"How to use advanced search\" class=\"read-more\" href=\"https:\/\/help.metashare.com\/en\/metashare\/usermanual\/find-documents\/how-to-use-advanced-search\/\" aria-label=\"Read more about How to use advanced search\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":10664,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":{"0":"post-205","1":"page","2":"type-page","3":"status-publish","5":"no-featured-image-padding"},"_links":{"self":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/comments?post=205"}],"version-history":[{"count":40,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/205\/revisions"}],"predecessor-version":[{"id":11699,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/205\/revisions\/11699"}],"up":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/10664"}],"wp:attachment":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/media?parent=205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}