Copied to clipboard

Flag this post as spam?

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


  • Joseph 12 posts 61 karma points
    Apr 07, 2015 @ 12:27
    Joseph
    0

    ezsearch - not searching child nodes

    Hi.  I've installed the ezsearch package.  I'm searching for a term located on one of the child pages. It does not come back in the search result.  When I configured ezsearch, I chose the root content node (the highest one I think).  Does this not automatically search all child nodes?  Again, I'm very new to Umbraco.

    Here's my code.  I believe I want searchfields to just search all fields? Is there a list of all umbraco fields somewhere?

    @Umbraco.RenderMacro("ezSearch", new {
             rootContentNodeId="1060" ,
          rootMediaNodeId="-1" ,
          indexType="CONTENT" ,
          searchFields="" ,
          previewFields="" ,
          previewLength="" ,
          pageSize="" ,
          hideFromSearchField="" ,
          searchFormLocation="" }) *@

    Many thanks.

     

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 07, 2015 @ 12:41
    Jan Skovgaard
    0

    Hi Joseph

    You need to specify, which fields you want ezsearch to look at when doing the search. Right now they're being empty.

    You can read more about these settings here https://our.umbraco.org/FileDownload?id=7816

    So try adding some field names like this and see if it helps - Please notice you need to add your own fieldnames - The once I added below are just what I'm guessing you might have on your document types.

    @Umbraco.RenderMacro("ezSearch", new {
             rootContentNodeId="1060" , 
          rootMediaNodeId="-1" , 
          indexType="CONTENT" , 
          searchFields="title,bodyText,meteDescription" , 
          previewFields="title, bodyText" , 
          previewLength="255" , 
          pageSize="10" , 
          hideFromSearchField="" , 
          searchFormLocation="" })
    

    Hope this helps.

    /Jan

  • Joseph 12 posts 61 karma points
    Apr 07, 2015 @ 13:02
    Joseph
    0

    Hi Jan,

    Thanks very much for the reply.  I have read through the documentation previously.  When it said default values, I assumed that meant leaving them blank would default to the fields listed.  I also tried manually filling in all the default values in the documentation with no luck.  Just to clarify,  I've just this second tried this code:

         @Umbraco.RenderMacro("ezSearch", new {
             rootContentNodeId="1060" ,
          rootMediaNodeId="-1" ,
          indexType="CONTENT" ,
          searchFields="title,bodyText,metaDescription" ,
          previewFields="title, bodyText" ,
          previewLength="255" ,
          pageSize="10" ,
          hideFromSearchField="" ,
          searchFormLocation="" })

    I searched for "We were first to bring" which exists on one of the child pages.  I searched through the CMS, the content I'm searching for is located within a 'Content Blocks' textbox on the mid-content tab. How do I include this in the search fields?

    Many thanks.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 07, 2015 @ 13:49
    Jan Skovgaard
    0

    Hi Joseph

    Ah yes, you're right about that I think. It's been a while since I set it up myself.

    Ok, so the search function works but it does just not include search terms from content elements? Is that correct? Say you search for text, which exists in the rich text field on a page document then it works? And if you try searching for a text, which comes from a content elements that has been attached to a page then it does not work?

    Just trying to make sure I fully understand the issue :)

    /Jan

  • Joseph 12 posts 61 karma points
    Apr 07, 2015 @ 15:03
    Joseph
    0

    Thanks for getting back to me again :)

    The search currently does not work at all.  The code above didn't return any results.

    I also tried searching for chunks of text found within the homepage > upper content tab, and then 'Headline Statement', 'Intro Text' and 'Outro text'.  Again, there was no results. Sorry I can't be of more help.

    Many thanks.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 07, 2015 @ 21:28
    Jan Skovgaard
    0

    Hi Joseph

    Ok, what version of Umbraco are you using? And how have you setup the package? Did you just make a clean installation and use it out of the box? Could you share some screendumps of what your setup looks like? It might make it easier to figure out where things go wrong.

    /Jan

  • Joseph 12 posts 61 karma points
    Apr 08, 2015 @ 10:54
    Joseph
    0

    Hi Jan,

    Thanks for getting back again. 

    Here is the version:

     

    When I installed, I went to Developer > Packages > Install local package

     

    We inherited this project through another software company, and I've been lumbered with it lol.  I don't know how it was originaly setup : / 

    Here's a few more screenshots of the setup.  I didn't really know what to include, so here's a couple of rich textboxes that ezsearch should search.

     

     

    Many thanks again,

    Joseph.

     

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Apr 08, 2015 @ 11:12
    Dennis Aaen
    0

    Hi Joseph,

    Since you are running Umbraco 6.1.6, you are probably running your installation in WebForms mode, and not MVC mode. If it´s the case try to see this thread how you need to add the search result macro to the template. You can use the button in the template editor, so you also get the params specified if it´s
    necessary.

    https://our.umbraco.org/projects/website-utilities/ezsearch/bugs-feedback-suggestions/63216-Search-function-in-one-div-with-results-in-another

    Hope this helps,

    /Dennis

  • Joseph 12 posts 61 karma points
    Apr 08, 2015 @ 11:38
    Joseph
    0

    Hi Dennis,

    Thanks for your advice.  I looked at the older post.  It seems the user had full-on old school webforms code in his template.  As I'm new to Umbraco, I don't know how to check webforms/MVC, however, my template looks like this:

     

    Please note, I didn't write any of this code, it's how it was as it was handed to me.  Would this make the project MVC mode? I tried the webforms version (<umbraco:macro) which still didn't return any results :(

    Many thanks,

    Joseph.

     Edit: I thought I should also mention that I've not seen any webforms code in any of the templates.

     

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Apr 08, 2015 @ 11:55
    Dennis Aaen
    0

    Hi Joseph,

    From the screenshot that you have posted, you are using MVC.

    /Dennis

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Apr 08, 2015 @ 11:55
    Jan Skovgaard
    0

    Hi Joseph

    You can find out if you're using MVC by having a look in the /config/umbracoSettings.config folder and look for the <defaultRenderingEngine> tag and see if it's set to either MVC or Webforms.

    You can also just look in the "masterpages" folder - If it's empty then you're using MVC. If not then you're using Webforms.

    /Jan

  • Joseph 12 posts 61 karma points
    Apr 08, 2015 @ 12:01
    Joseph
    0

    Thanks both,

    Just to confirm, it's set to mvc. 

    Joseph

  • Joseph 12 posts 61 karma points
    Apr 08, 2015 @ 17:39
    Joseph
    0

    Just to give more information on this, I created a brand new MVC project and installed the Umbraco from nuget (the latest umbraco looks gorgeous).  ezsearch still did not return any results for:

    "Danish island in the North Sea off the coast of southwestern Denmark, and is the very northernmost" - a term used within the default umbraco template.

    This makes me believe that my options are set wrong.

         @Umbraco.RenderMacro("ezSearch", new {
             rootContentNodeId="-1" ,
          rootMediaNodeId="-1" ,
          indexType="CONTENT" ,
          searchFields="title,bodyText,metaDescription" ,
          previewFields="title, bodyText" ,
          previewLength="255" ,
          pageSize="10" ,
          hideFromSearchField="" ,
          searchFormLocation="" })

    Many thanks,

    Joseph

  • Joseph 12 posts 61 karma points
    Apr 17, 2015 @ 17:27
    Joseph
    0

    Anymore thoughts on this?  I still can't get it to work.

    Many thanks,

    Joseph

  • Ross Ekberg 124 posts 364 karma points
    Feb 05, 2016 @ 18:47
    Ross Ekberg
    0

    Something I had to do was confirm that my "bodyText" was actually called that. Turns out it wasn't. During the original install, it must have been set to something more specific. Can you verify what the 'bodytext' alias is? You can see this in the document type's generic properties.

Please Sign in or register to post replies

Write your reply to:

Draft