Copied to clipboard

Flag this post as spam?

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


  • Manish 373 posts 932 karma points
    Jan 29, 2013 @ 04:55
    Manish
    0

    search is not giving desired result with Exclude node type

    I have a node in XML with the name "productPageTitle" and I dont want this node to be a part of search result.

    <ExcludeNodeTypes>
          <add Name="titleProperties"/>
        </ExcludeNodeTypes>

    So I used <ExcludeNodeType> but still as a part of result.

    How can I exclude this node from search results?

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 29, 2013 @ 08:39
    Douglas Robar
    0

    Hi, Manish,

    I think you are confusing the Examine search engine with XSLTsearch. The two are not related.

    To exclude specific document types with XSLTsearch you would update the xsltsearch.xslt file to specify which document type alias(es) you want to omit from the search results in the "possibleNodes" variable:

    <xsl:variable name="possibleNodes" select="$items/descendant-or-self::*[
                                 @isDoc
                                 and string(umbracoNaviHide) != '1'
                                 and name() != 'productPage'
    <!-- Hide doctype from search -->
                                 and count(attribute::id)=1
                                 and (umbraco.library:IsProtected(@id, @path) = false()
                                  or umbraco.library:HasAccess(@id, @path) = true())
                               ]"/>

     

    But if you're using Examine you will need to exclude things according to its instructions.

    cheers,
    doug. 

  • Manish 373 posts 932 karma points
    Jan 29, 2013 @ 09:16
    Manish
    0

    Sir Douglas Robar ,

     

    I am using razor not xslt and  i set this in Examine index config file.

     

    Please guide accordingly.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 29, 2013 @ 09:23
    Douglas Robar
    0

    Sorry, then, this forum is for XSLTsearch not Examine. 

    cheers,
    doug. 

     

  • Manish 373 posts 932 karma points
    Jan 29, 2013 @ 10:24
    Manish
    0

    How i can implement search using xslt , i used it using razor but not successed . Please provide url from where i can get idea of search using xslt.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 29, 2013 @ 10:54
    Douglas Robar
    0

    Hi, Manish,

    You need to understand that there are two very different search engines -- XSLTsearch and Examine. Each has strengths but they approach things very differently.

    XSLTsearch is very easy to get working, with good default options and a fair amount of customisation via macro parameters and (as you've seen above, even altering the XSLT code itself). Download it from the package repository in umbraco and follow the PDF documentation. It's very simple to use... it's just a macro that you put on a template to do the search and display any results. The macro and template are part of the package to get you going quickly. 

    XSLTsearch is a 'brute force' search and generally won't be appropriate when searching more than a few thousand pages. Nor can it search inside media items such as PDFs and Office files.

    Examine is built on the Lucene .net search engine and is fully indexed for awesome performance on sites of any size. But it is much more tricky to get running properly. It can be worth the effort if your site needs its capabilities though. But you'd have to ask questions elsewhere on the forum as this particular forum is for XSLTsearch only.

    cheers,
    doug. 

Please Sign in or register to post replies

Write your reply to:

Draft