Hi all,
I have a question regarding core search webpart query template with date time managed properties in SharePoint 2013 version.
1. I created a OOTB Announcement list --> create some item with expires date value.
2. Perform full crawl.
3. Add a Core Search WebPart in my default page and modify the Query Template to search only Announcement item (search by content type) --> It works perfectly, all items are shown.
4. I change the query template by adding ExpiresOWSDATE managed properties. The Query Template: ExpiresOWSDATE<2013-09-05T22:00:00Z, and I got this error:
We didn't understand your search terms. Make sure you're using the proper syntax.
In SharePoint Log:
Microsoft.Office.Server.Search.Query.Ims.ImsQueryInternal : Unhandled exception Microsoft.Office.Server.Search.Query.QueryMalformedException: Query 'ExpiresOWSDATE<2013-09-05T22:00:00Z -ContentClass=urn:content-class:SPSPeople' failed: syntax errorat position 0, The operation is illegal for the given property, property expression: ExpiresOWSDATE<2013-09-05T22:00:00Z
I try to change the query but no help. It does not work with ExpiresOWSDATE<=2013-09-05T22:00:00Z, ExpiresOWSDATE>=2013-09-05T22:00:00Z or ExpiresOWSDATE=2013-09-05T22:00:00Z, etc....
But it does work with ExpiresOWSDATE:2013-09-05T22:00:00Z --> return 1 item.
So this is my question:
1. How do I make it work with other operation? I really need it to work with <= and >=
2. If I put space between ExpiresOWSDATE and 2013-09-05T22:00:00Z value. e.g. ExpiresOWSDATE [space] <= [space] 2013-09-05T22:00:00Z --> There's no error but no item return. It's really weird.
Please help me with this.