Copied to clipboard

Flag this post as spam?

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


  • NDDT 68 posts 240 karma points c-trib
    Mar 18, 2016 @ 11:12
    NDDT
    0

    Examine Lucene Query not working

    I have a problem with handing my lucene query to umbraco.

    This is the query:

     +updateDate:{2016-03-30T00:00:00 TO 9999-12-31T23:59:59}
    

    I use this code to hand it over:

    ISearchCriteria sc = Searcher.CreateSearchCriteria();
    var searchResults = Searcher.Search(sc.RawQuery(queryString));
    

    But the LuceneQuery of the sc-Object is changed to:

    {+(+updateDate:{0imdyvgg0 TO 9999-12-31t23:59:59})}
    

    Can someone explain why this is happening or how to solve this?

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 18, 2016 @ 11:37
    Ismail Mayat
    0

    Not sure but try doing the date range search using examine itself you will have to massage dates into index first using gathering node see

    https://our.umbraco.org/forum/developers/extending-umbraco/45670-Lucene-not-filtering-on-date-range

    Regards

    Ismail

  • NDDT 68 posts 240 karma points c-trib
    Mar 21, 2016 @ 10:17
    NDDT
    0

    But why... Lucene can do a lexicographic Rangesearch. And I have Datestrings in the index. That should work. What doesn't work is handing over the Lucene-String.

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Mar 21, 2016 @ 10:48
    Ismail Mayat
    0

    NDDT,

    Could be a bug with the examine parser when using raw query and date ranges? You want to download examine source and set breakpoint and step through see where its going wrong?

    Regards

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft