Copied to clipboard

Flag this post as spam?

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


  • Steven Wilber 103 posts 98 karma points
    Dec 15, 2009 @ 11:06
    Steven Wilber
    1

    UmbracoExamine and Protected Areas of the Website

    I'm just starting to look at Umbraco Examine and it looks to be really good, especially with the provider model. I've not got my head round it yet completely.

    The thing that I'm struggling with is that it does not seem to index areas of the website protected by a login.

    I suspect that I'm being outrageously daft in some way (lots of sleepless nights with baby), but could someone point me in the right direction as to how to fix this.

    Sorry for popping this in the API section - just in anticipation of 4.1.

     

    Cheers

     

    Steve

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 15, 2009 @ 22:40
    Aaron Powell
    0

    To the best of my knowledge Examine will index everything regardless of the public accessibility of the node.

    Are the document types appropriately configured to be indexed, including the protected ones?

  • Steven Wilber 103 posts 98 karma points
    Jan 28, 2010 @ 21:57
    Steven Wilber
    0

    Hi Slace,

    Sorry for the late reply. Yes, most of the pages are of one common type 'Page: Generic' the only difference is that some area are protected using the Umbraco Public Access techniques.

    Anyone any ideas?

    Cheers

    Steve

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Jan 28, 2010 @ 22:46
    Aaron Powell
    0

    If you're not wanting the protected ones indexed you're probably going to have to write a custom index provider. It's not very had, just inherit from the default one but when it's processing a node you'll have to check if it's public or not.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jan 28, 2010 @ 23:36
    Douglas Robar
    0

    The protected nodes *should* be indexed. But they should not be shown in search results unless the visitor has access to them. That should be default behavior in Examine, imo.

    Besides, that's how XSLTsearch does it. :)

    cheers,
    doug.

  • Steven Wilber 103 posts 98 karma points
    Jan 30, 2010 @ 11:52
    Steven Wilber
    0

    Hi Doug, Slace,

    Thanks for the replies. It seems that I need to dig a little deeper into this when it gets back to the top of the development queue. It's all very exciting Umbraco Examine, and what I have made it do to date I'm really happy with.

    Cheers

    Steve

  • Murray Roke 503 posts 966 karma points c-trib
    Apr 28, 2010 @ 06:03
    Murray Roke
    0

    Hi All

    I need to do this as well. I need search to search everything when you're logged in, and only the public parts when you're not logged in.

    Slace, do I override UmbracoExamine.LuceneExamineIndexer ?

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    May 03, 2010 @ 01:13
    Shannon Deminick
    0

    You can turn on/off whether or not you want to index content that is protected. This is a simple switch in the config for the index provider:

     supportProtected="false"

    The internal index has this enabled in 4.1 so that you can search everything in the back office. For front-end searching, you'd generally want to turn this off. However, if you want to index protected content to expose the search results to your users depending on if they are logged in or not (and/or have access to the content) you can do this in two ways:

    1. Create an index for public members and create another index for logged in members and use a different search provider at runtime depending on user type, OR

    2. Parse your search results to determine if you should show the result to the member or not depending on if they are logged in or not.

    Hope this helps!

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    May 03, 2010 @ 01:15
    Shannon Deminick
    3

    In the next week or so we'll be writing a new unit test suite for Examine and a full documentation suite so this should hopefully make it easier for everyone.

Please Sign in or register to post replies

Write your reply to:

Draft