I've been using FullTextSQLQuery or Search Web Service in my custom search solution till today. Wanted to explore KeywordQuery but usage of 'LastModifiedTime' in query doesn't return search results.
code snippet:
SPServiceContext context = SPServiceContext.GetContext(SPServiceApplicationProxyGroup.Default,
SPSiteSubscriptionIdentifier.Default);
SearchServiceApplicationProxy ssap = context.GetDefaultProxy(typeof(SearchServiceApplicationProxy))
as SearchServiceApplicationProxy;
using (KeywordQuery query = new KeywordQuery(ssap))
{
query.QueryText = "IsDocument:1 Filename:\"Test*\" Path:\"http://sp2010vm/Shared Documents/*\" (LastModifiedTime > '2011/04/25 05:00:00 PM' AND LastModifiedTime <= '2011/04/26 06:00:00 PM')";
...
Removing LastModifiedTime check works perfectly. How to include LastModifiedTime criteria? Also,is there a way to simulate Filename LIKE 'Test%' behavior using KeywordQuery? Neither Filename:"Test%" nor Filename:"Test*" works this way.
--Praveen