what version of umbraco are you using? Also is this for internal search or search on front end of the website? If internal search then you will have an index already and you can use examine to search but you will need to write your own dashboard control to do it. If its for front end search you will need to create an index then the search form. Either way see http://www.farmcode.org/page/Umbraco-Examine.aspx and also search on this forum for regarding how to search using examine.
Searching by date
Hello,
I have a content which has a date property.
I want to search which events exist between 2 dates.
How can I do this using fluent search API?
Thanks.
Seyfullah,
what version of umbraco are you using? Also is this for internal search or search on front end of the website? If internal search then you will have an index already and you can use examine to search but you will need to write your own dashboard control to do it. If its for front end search you will need to create an index then the search form. Either way see http://www.farmcode.org/page/Umbraco-Examine.aspx and also search on this forum for regarding how to search using examine.
Regards
Ismail
I am using umbraco v 4.6.1 (Assembly version: 1.0.4029.25836).
It is for on front end of the web site. I created the index also. I only need the query. I have the following code.
SearchTerm = Request.QueryString["s"];
if (string.IsNullOrEmpty(SearchTerm)) return;
var criteria = ExamineManager.Instance
.SearchProviderCollection["DemoSearcher"]
.CreateSearchCriteria(UmbracoExamine.IndexTypes.Content);
var fields = new[]
{
"nodeName", "bodyText", "siteName", "siteDescription",
"file", "publishedYear", "author", "summary", "startDate", "endDate", "phone",
"city", "address", "description", "siteName", "link"
};
var filter = criteria .GroupedOr(fields, SearchTerm) .Not() .Field("UmbracoNaviHide", "1") .Compile();
SearchResultList = ExamineManager.Instance.SearchProviderCollection["DemoSearcher"].Search(filter);
I want to filter the publishedYear.
Thanks.
is working on a reply...