Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mus'ab 157 posts 385 karma points notactivated
    Oct 23, 2019 @ 08:49
    Mus'ab
    0

    How to use range query for examine to search between tow date based on date picker value ?

    Hello everybody

    I want to write an examine search that return files between tow dates come from property value so i tried to use range query and here is my code :

     var searcher = indx.GetSearcher();
                        ISearchResults results = null;
                        results = searcher.CreateQuery()
                        .Field("path", Umbraco.Media(124111).Path.MultipleCharacterWildcard()).And()
                        .Field("__NodeTypeAlias", "File").And()
                        .RangeQuery<DateTime>("fileDate".Split(','),Convert.ToDateTime("04/06/2017"),DateTime.Now)
                        .Execute();
    

    but i faced this error :

    enter image description here

    any help ?

Please Sign in or register to post replies

Write your reply to:

Draft