Copied to clipboard

Flag this post as spam?

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


  • Gary 80 posts 377 karma points
    Jan 25, 2019 @ 14:58
    Gary
    0

    eZSearch seems to be ignoring custom RootMediaNodeId

    Hi,

    Using eZSearch and it is all working as expected. However, when i specify a specific folder ID within the macro to specify which root node to use, it returns no results but if i leave it as standard to search all media, it returns the correct items.

    The idea is to have a folder that is only searchable by the public. I have had this working previously but doesn't seem to be working on my current site.

    Thanks in advance :)

    Umbraco v7.12.4

    Kind Regards,

    Gary Henshall

  • David Challener 80 posts 444 karma points c-trib
    Jan 25, 2019 @ 22:03
    David Challener
    0

    Hi Gary,

    This seems to be working for me - have you changed your examineIndex.config or examineSettings.config files at all?

    Have you tried specifying and different node ids to see if it is just that specific node causing an issue?

    Many thanks, David

  • Gary 80 posts 377 karma points
    Jan 28, 2019 @ 10:29
    Gary
    0

    Hi David,

    I haven't made any changes myself to the two examine config files. I have also tried different nodes and it doesn't work unless i don't specify one and it uses the default "All media".

    Is there anything in particular that could be causing this?

    Thank you for your help :)

    Kind Regards,

    Gary Henshall

  • David Challener 80 posts 444 karma points c-trib
    Jan 29, 2019 @ 13:19
    David Challener
    0

    Hi Gary,

    I've just booted up a new build with the starter kit and installed ezSearch and it works out of the box.

    Can you put this code

    <pre>@query.ToString()</pre>
    

    above (around line 115)

     var criteria2 = criteria.RawQuery(query.ToString());
    

    and then see what gets written out to the page. This should show you the lucene query that is being constructed. You can then test this query against the index directly in the back office. Navigate to Developer -> Examine Management -> Searchers and expand ExternalSearcher -> Search Tools. Toggle the Lucene Search radio button and paste in the query that is written out to your search page here.

    If this isn't returning anything, I suggest it hasn't made it into your index, or the query is broken.

    Paste your results here and we'll debug!!

    Many thanks,

    David

  • Gary 80 posts 377 karma points
    Jan 29, 2019 @ 14:03
    Gary
    0

    Hi David,

    I have done as above. The results are as below:

    Query returned when i don't specify a RootMediaNodeId: (Returns a MEDIA image called "High Rise")

    -umbracoNaviHide:1 +((__IndexType:content -template:0) (__IndexType:media)) +(nodeName:high* pageTitle:high* pageDescription:high* pageTopic:high* metaData:high* ) +(nodeName:rise* pageTitle:rise* pageDescription:rise* pageTopic:rise* metaData:rise* ) nodeName:high*^5 nodeName:rise*^5 pageTitle:high*^4 pageTitle:rise*^4 pageDescription:high*^3 pageDescription:rise*^3 pageTopic:high*^2 pageTopic:rise*^2 metaData:high*^1 metaData:rise*^1
    

    Query returned when i specify a RootMediaNodeId (Doesn't return any search MEDIA results)

    -umbracoNaviHide:1 +((__IndexType:content -template:0) (__IndexType:media +searchPath:2519)) +(nodeName:high* pageTitle:high* pageDescription:high* pageTopic:high* metaData:high* ) +(nodeName:rise* pageTitle:rise* pageDescription:rise* pageTopic:rise* metaData:rise* ) nodeName:high*^5 nodeName:rise*^5 pageTitle:high*^4 pageTitle:rise*^4 pageDescription:high*^3 pageDescription:rise*^3 pageTopic:high*^2 pageTopic:rise*^2 metaData:high*^1 metaData:rise*^1 
    

    Pasting these two in the Developer Lucene External Searcher reflects what is shown on the front end of the website. Pointing towards indexer issues?

    A note to add is that this current site is a copy of another site so i am not sure if that may have something to do with it?

    Thanks again for the help :)

    Kind Regards,

    Gary Henshall

  • David Challener 80 posts 444 karma points c-trib
    Jan 29, 2019 @ 14:58
    David Challener
    0

    Hmm. Yes, looking that way.

    Just to clarify 2519 is the Id of the folder node that contains the media image called "High Rise"?

    From the Examine Management tab, can you open up the ExternalIndexer -> External Index & Tools and click rebuild index.

    Is this a new site or a mature site? It could take a while to rebuild based on how many nodes you have to index, but I'm assuming you're working on a dev version at the moment. If not, you may want to choose a time to rebuild the index when less busy.

    On the text search radio button of Examine Management Searchers, try putting in High Rise and see if it is in the index.

    Many thanks, David

  • Gary 80 posts 377 karma points
    Jan 29, 2019 @ 16:52
    Gary
    0

    Correct, 2519 is the Media folder with content we want to be able to search. This folder contains the High Rise image which returns in the results if we DO NOT specify a rootMediaNodeId.

    I am currently using a dev copy of the site. Using the Text Search also returns the images before and after rebuilding the indexes but still no luck on the front end.

    I have also done a Text search for that specific folder and that appears with the correlating ID's.

    Kind Regards,

    Gary

  • David Challener 80 posts 444 karma points c-trib
    Jan 29, 2019 @ 18:04
    David Challener
    0

    Hi Gary,

    I feel I'm running out of ideas on this one!

    I can see that the search fields look slightly different to mine (OOTB)

    { "nodeName", "metaTitle", "metaDescription", "metaKeywords", "bodyText" }
    

    The preview field is bodyText by default.

    I don't know whether media uses metaTitle rather than the nodeName - that certainly wasn't my understanding but hey!

    When you do your back office Examine Management query and it returns the media image "High Rise" in the index, could you copy that into the thread so I can see what fields are in the index please.

    Many thanks, David

  • Gary 80 posts 377 karma points
    Jan 30, 2019 @ 10:15
    Gary
    0

    Hi David,

    I am the same as you, it definitely exists within the index:

    __Icon: icon-picture __IndexType: media __Key: 9affe9fc-5584-47fb-b3a9-0c4088ce0246 __NodeId: 2809 __NodeTypeAlias: image __Path: -1,2519,2809 createDate: 20190125143153000 creatorID: 0 id: 2809 key: 9affe9fc-5584-47fb-b3a9-0c4088ce0246 level: 2 nodeName: high-rise.jpg nodeType: 1032 nodeTypeAlias: Image parentID: 2519 path: -1,2519,2809 sortOrder: 4 template: 0 umbracoBytes: 71193 umbracoExtension: jpg umbracoFile: { "src": "/media/1453/high-rise.jpg", "crops": [ { "alias": "topicThumbnail", "width": 100, "height": 100 } ], "focalPoint": { "left": 0.5, "top": 0.5 } } umbracoHeight: 500 umbracoWidth: 500 updateDate: 20190129164408000 urlName: high-risejpg version: 4e73a3e4-b1dd-4b48-bfc4-d3c084445d77 writerID: 0 writerName: Gary Henshall
    

    NodeName seems to exist. This is a weird one and i cannot figure out what is going wrong here. Both the folder and the child image exists in the index and the ID's in the index are the same as it is in the media section.

    Not sure where to go from here. I have added a new "Searchable" folder and added a new child image. Rebuilt the index and this is visible on the Developer Index searchers. However, the new image is not being returned on the front end using the ezSearch with or without a rootMediaNodeId. Could there be a possibility that there is two indexes here? It feels like the ezsearch is using a different index to what Umbraco is.

    Thanks for your help with debugging the issues.

    Kind Regards,

    Gary Henshall

  • David Challener 80 posts 444 karma points c-trib
    Jan 31, 2019 @ 11:47
    David Challener
    0

    Hi Gary,

    Can you just check you have a file called Our.Umbraco.ezSearch.dll in your bin folder?

    Basically my thinking is like this - Lucene struggles with hyphens/dashes (-) in fields unless using the right analyser (can't remember it off the top of my head) so nodeName might not return what you're expecting here. However, ezSearch adds an additional field "contents" to the index that I can't see on your output here. This is basically most of the fields space separated so it can search easier.

    Many thanks, David

  • Gary 80 posts 377 karma points
    Feb 01, 2019 @ 10:55
    Gary
    0

    Hi David,

    Unfortunately, the dll exists! I have searched to see if any other files are missing and the only thing i can see is the ezsearch config within the installedpackages.config file.

    Would this have any affect? Apart from that i can't see any issue.

    Kind Regards,

    Gary Henshall

  • David Challener 80 posts 444 karma points c-trib
    Feb 01, 2019 @ 14:13
    David Challener
    0

    Hi Gary,

    I've made some progress with my version, and get it to throw a similar error - it looks like ezSearch is still set to find the umbracoFile directly being set rather than checking if it is an ImageCropper (and therefore stored as json).

    https://github.com/umco/umbraco-ezsearch/issues/7

    I just tried changing the method in the App_Code folder in ezSearchBootstrapper.cs on line 49

     //if(e.Fields.ContainsKey("umbracoFile"))
            //{
            //    e.Fields["umbracoFileName"] = Path.GetFileName(e.Fields["umbracoFile"]);
            //}
            if (e.Fields.ContainsKey("umbracoFile"))
            {
                var match = Regex.Match(e.Fields["umbracoFile"], @"(/media.*?.(jpg|png|gif|jpeg|svg))");
                if (match.Success)
                {
                    e.Fields["umbracoFileName"] = match.Value;
                }
            }
    
  • Gary 80 posts 377 karma points
    Feb 05, 2019 @ 12:03
    Gary
    0

    Hi David,

    Thank you, I just tried adding in the changes that you have mentioned but still no luck! I don't think this issue relates as this still wouldn't work when an ID isn't provided for the rootMediaNode?

    Kind Regards,

    Gary Henshall

  • aaeda 117 posts 150 karma points
    Mar 07, 2019 @ 10:23
    aaeda
    0

    Hello

    Same issue here. Tried the solution provided but no luck. Any ideas please?

    Thanks

  • Gary 80 posts 377 karma points
    Apr 01, 2019 @ 08:08
    Gary
    0

    Hello,

    Apologies for the delay. I still haven't found the work around for this so please if you do find something please share. I had tried all steps discussed above but no luck :(

    Kind Regards,

    Gary Henshall

  • aaeda 117 posts 150 karma points
    Apr 01, 2019 @ 08:45
    aaeda
    0

    Hello

    It is working now for me. There was a custom index in the Examine configs that was causing the issue.

    Hope that helps.

    Regards A

Please Sign in or register to post replies

Write your reply to:

Draft