2

I have below search query:

 http://siteURL/_api/search/query?querytext='ContentType:"CTName" AND 
 AirDateOWSDATE<2018-12-07T05:00:00.000Z'&trimduplicates=false&rowlimit='500'&selectproperties='Path,Title,AirDateOWSDATE'

Without Air Filter, I am able to get the results: enter image description here

Please note that this is a Date field and results are returned in String format. I am not sure whats wrong when I add the date filter. Please help

  • it is Date Field but all the values in Search Index result stored in String and it will return also as string.if you want to use then again convert this string to the Date format.Regarding your AirDate filter mat be you need to include gt instead of "<". here is a refrence for Date Filter sharepoint.stackexchange.com/questions/100989/… – vinit kumar Dec 10 '18 at 7:34
0

Ensure the managed property of AirDateOWSDATE is queryable.

When we have changed a managed property, or when we have changed the mapping of crawled and managed properties, the site must be re-crawled before our changes will be reflected in the search index. Because our changes are made in the search schema, and not to the actual site, the crawler will not automatically re-index the site.

In SharePoint Online, crawling happens automatically based on the defined crawl schedule.We cannot manually start a full crawl for contents or control crawl in SharePoint online. To make sure that our changes are crawled and fully re-indexed, we must request a re-indexing of the site. The site content will be re-crawled and re-indexed so that you can start using the managed properties in queries, query rules and display templates.

Information about search schema in SharePoint Online.

Information about how to manually request crawling and re-indexing of a site, a library or a list.

It is recommended that open a support case if content is not being reflected as expected in search within 24 hours.

You can contact Office 365 technical support from Support > New Service request.

Provide as much additional information as possible to describe your issue.

Introduction to SharePoint Online Search

Update:

The type of the "AirDateOWSDATE" managed property is "Text" instead of "Date and Time", so it returns string instrad of DateTime. You need to use a new managed property with "Date and Time" type.

  • I am facing this issue in Sharepoint Online. Managed property is already querable. Issue is with the return type. It is being returned as Text instead of DateTime and I can't update the return type. As a workaround, I mapped the same crawled property with OOB RefinableDate field but it is not returning any results. – Deepmala Dec 10 '18 at 16:36
  • The type of the "AirDateOWSDATE" managed property is "Text" instead of "Date and Time", so it returns string instrad of DateTime. You need to use a new managed property with "Date and Time" type. As the SharePoint Online crawl happens automatically (as I mentioned above), you need to wait. Check my updated answer. – JoannaW_MSFT Dec 11 '18 at 1:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.