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.
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.
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.
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.
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.
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.
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.
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
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?
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
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.
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.
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
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 ?
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!
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.
is working on a reply...