Copied to clipboard

Flag this post as spam?

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


  • Darren Wilson 229 posts 597 karma points
    Jan 14, 2016 @ 17:05
    Darren Wilson
    0

    Problem indexing pageName

    Hi,

    I'm using Umbraco forms to create nodes and using ezSearch to search through these. I'm using this to search:

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

    The search is working and will display results from the 'answer' field, however, if you enter the page title (pageName) into the search it shows no results. I've tried this with different nodes not just the one indicated with no results. I've also refreshed the lucene index.

    I'm running Umbraco 7 locally with MsSQL CE.

    Any help will be greatly appreciated as I've been banging me head against a brick wall with this for hours ha ha.

    Thanks Darren

  • Darren Wilson 229 posts 597 karma points
    Jan 14, 2016 @ 17:21
    Darren Wilson
    0

    Another question: Say if you enter a sentence, no results - if you enter two words (say the first two) it finds them within the body copy. Any ideas?

  • keilo 568 posts 1023 karma points
    Jan 15, 2016 @ 10:24
    keilo
    0

    Hi Darren

    have you tried manually publishing the root node (root of manually created nodes) and its children and try searching again?

  • Darren Wilson 229 posts 597 karma points
    Jan 15, 2016 @ 10:47
    Darren Wilson
    0

    Hi Keilo,

    Thanks for the response.

    Yeah, I've tried that and still nothing.

    Thanks

    Darren

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 16, 2016 @ 11:12
    Douglas Robar
    101

    Hi, Darren,

    Isn't the built-in field name for the name of a page 'nodeName'? Unless you've added a doctype property with an alias of 'pageName' and have content in those fields.

    You can check what's in the examine index. This forum thread goes into detail so I won't bother to copy-paste half of it here. Shout if you don't get the gist of how to look in the index to know for certain what is and isn't there. https://our.umbraco.org/forum/developers/api-questions/71652-index-contains-no-chinese-nodes-in-frontend

    As for searching... ezSearch does a simple 'and' search for each term you enter. If you search for HELLO WORLD you're really looking for both those words, but they don't need to be an exact phrase.

    In fact, it is a wildcard search for each word. As if you're searching for HELLO* and WORLD*. The search terms must begin with the letters of each word but can then have anything after them. Searching for HELLO WORLD would bring back a result if you had content of HELLOKITTY and elsewhere in the searched content, WORLDLY.

    This approach works for most search scenarios based on how most people actually use search engines on sites (they don't do sophisticated searches, just simple stuff). If you need more capability in your searching then ezSearch may not be adequate and you'll want to extend it or roll your own. All the data is in the lucene/examine index so it's just a matter of creating the correct lucene search queries based on what site visitors type into your search box.

    Hope this helps.

    cheers,
    doug.

  • Darren Wilson 229 posts 597 karma points
    Jan 18, 2016 @ 09:49
    Darren Wilson
    0

    This has indeed fixed it! Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft