Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

[SharePoint 2013] Core Search Query Template with DateTime managed properties

$
0
0

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.

SHOW DETAILSHIDE DETAILS
Correlation ID: 1d86419c-f6a5-b0a3-362b-57435be37537

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 error
 at 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.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>