Copied to clipboard

Flag this post as spam?

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


  • Doug Mackay 56 posts 155 karma points
    May 23, 2014 @ 11:00
    Doug Mackay
    0

    Other packages break when ezSearch is installed

    Hi,

    It seems that ezSearch can break other packages that also use the Lucene index (e.g. in uBlogsy no posts show up on the landing page).

    I've not had a chance to fully debug but believe this is due to the fact that ezSearch forces the index keys to be lowercase (commenting out this part in the ezSearchBootstrapper.cs does seem to resolve the issue)

  • Geoff Beaumont 75 posts 102 karma points
    May 29, 2014 @ 17:12
    Geoff Beaumont
    0

    Hi Doug,

    I can confirm I'm seeing exactly the same as you (also uBlogsy affected in my case, but I guess anything that uses Lucene and doesn't expect its keys to be lowercased). Commenting this section out restores uBlogsy functionality.

    I'm also getting null reference exceptions from the following line in ezSearchBoostrapper (bootstrapper, surely?!):

    e.Fields["umbracoFileName"] = Path.GetFileName(e.Fields["umbracoFile"]);

    These are because e.Fields["umbracoFile"] is a JSON object not a path string (Umbraco 7.1.1, using the built in image cropper).

    Not that I'm getting any results back from ezSearch anyway...not sure what the issue is there, I'm hoping I've misconfigured something.

    Geoff

  • Geoff Beaumont 75 posts 102 karma points
    May 29, 2014 @ 17:27
    Geoff Beaumont
    0

    Well, RTFM on getting results, at least! Works fine when I set it to field names that actually exist on the site...

    Geoff

  • keilo 558 posts 1013 karma points
    Jun 29, 2014 @ 14:07
    keilo
    0

    Hi Doug and Geoff

    Have you resolved the uBlogsy conflict in this case? I have just installed ezSearch on top of uBlogsy, running on 7.1.4 and would like to confirm how the uBlogsy conflict is resolved and what needs to be done exactly to ensure it works without conflict?

    I also cant seem to get the search term highlight working. Not sure if you have experienced or know of a solution..

    cheers

  • keilo 558 posts 1013 karma points
    Jun 29, 2014 @ 15:33
    keilo
    0

    Just a quick update, I have sorted the highlight issue but I cant seem to get the uBlogsy working back as before.

    I have downloaded the source for ezSearch, comment out the following routine in ezSearchBootStrapper.cs

    // Lowercase all the fields for case insensitive searching

                /* conflict with ublogsy

                  var keys = e.Fields.Keys.ToList();

                 foreach (var key in keys)

                 {

                     e.Fields[key] = HttpUtility.HtmlDecode(e.Fields[key].ToLower(CultureInfo.InvariantCulture));

                 }

                 */

    replaced the compiled .dll in the BIN folder. Ublogsy still not showing up.

    Am I doing the replacement on the corrent place, or missing some intermediate step?

     

  • Geoff Beaumont 75 posts 102 karma points
    Jun 30, 2014 @ 11:31
    Geoff Beaumont
    0

    Hi keilo,

    The bootstrap code only runs when the Examine indexes are populated, so you need to clear them out and force reindexing. Go to ~/App_Data/TEMP/ExamineIndexes, go into each of the subdirectories and delete all files and subdirectories (you may need to stop the web server to release locks on the files). When you restart the web server Examine will repopulate these directories using the modified bootstrap code.

    I've found that commenting out this block is all that's required - the search provided by ezSearch is still case insensitive and uBlogsy works correctly. I'm guessing Matt put that code there for a reason, though, so maybe on older version of Umbraco you wouldn't get a case insensitive search?

    I haven't attempted to do anything about the image code as yet, mainly because I'm actually not that bothered about searching image file names on the sites I have which are affected by this.

    Geoff

  • keilo 558 posts 1013 karma points
    Jul 02, 2014 @ 09:29
    keilo
    0

    Hi Geoff

    I did rebuild the index after moving the DLL, via the Developer-Examine dashbaord. And that didnt work.

    So I have followed your advise and manually deleted all indexes under TEMP, and voila uBlogs shows up again! Many thanks for taking the time to clarify that.

    I too have no idea why the routine for lowercasing put in place, as search accepts (like you said) lower/upper case.

    Also the image is not that important but PDF files that get hit.. that would be great to get it working, as its quite relevant to site search.

    Thanks for the pointer!

    Cheers

  • RunnicFusion 60 posts 143 karma points
    Jul 25, 2014 @ 16:12
    RunnicFusion
    0

    Hi, i'm also following this topic, have the conflict also myself.

    • Umbraco 6.16
    • uBlogsy 3.0.2
    • ezSearch 1.2

    (no lucene post, tags etc. with uBlogsy and also ezSearch has no results. (the dev tab in umbraco search tools returns the right pages when searching/testing)

    Did you guys find out the sollution allready?

  • Doug Mackay 56 posts 155 karma points
    Sep 15, 2014 @ 11:09
    Doug Mackay
    0

    I did some more dubugging on this issue.

    There is no need for ezSearch to force all field values to lower case. The Umbraco ExternalSearcher analyser already includes a lowercase filter so all searches are case insenitive anyway.

    To fix the issue remove the lines

    // Lowercase all the fields for case insensitive searching
    var keys = e.Fields.Keys.ToList(); 
    foreach (var key in keys) 

    e.Fields[key] = HttpUtility.HtmlDecode(e.Fields[key].ToLower(CultureInfo.InvariantCulture)); 

    from 'App_Code/ezSearchBoostrapper.cs' and then rebuild the Examine ExternalIndex.

    The issue that the above causes with uBlogsy is that in the uBlogsy UmbracoExamineEvents it has an event that add fileds to the examine index

     if (e.Fields["nodeTypeAlias"] == "uBlogsyPost")
    {
    ... // year e.Fields.Add(Constants.Examine.uBlogsySearchableYear, DateTime.Parse(date).Year.ToString()); // month e.Fields.Add(Constants.Examine.uBlogsySearchableMonth, DateTime.Parse(date).Month.ToString()); // day e.Fields.Add(Constants.Examine.uBlogsySearchableDay, DateTime.Parse(date).Day.ToString()); ... }

    as 'e.Fields["nodeTypeAlias"] == "uBlogsyPost"' will never match these fields don't get added which then breaks the uBlogsy post listings

     

     

Please Sign in or register to post replies

Write your reply to:

Draft