Monthly Archives: April 2012

SP2010: Why are my list items not indexed?

Ok, so we struggled with a little problem which could be a big problem if you don’t know where to look. Imagine you’ve got your site with a couple of lists, but list items aren’t indexed by the search engine. What to do? This post is meant as a quick guide on stuff you should check.

  • First of all, make sure you can search. That’s kind of a different topic which involves checking if your search services are running, your service application is setup properly and there’s a content source which points to your site. For instructions on how to setup search; read the f* manual.Ok, so from this point on, I’ll assume search is working and you’re able to find other stuff on your site. But the stuff you want to find, you cannot.
  • At web level, there’s an exclusion setting. Check Site Settings => Site Administration => Search and offline availability. You can exclude an entire site, and manage whether lists with fine-grained permissions are indexed or not.
  • You can configure these things with powershell too if you want to. I’m saying this because there seems to be one more setting (the first one) which isn’t shown in the GUI:
    • SPWeb.AllowAutomaticASPXPageIndexing
    • SPWeb.ASPXPageIndexMode
    • SPWeb.NoCrawl
  • At list level, you can also exclude a list from appearing in search results. Check that in your list settings.
  • There’s exclusion in the search service itself. Someone might have set up a rule which excludes your items. Perhaps not that likely, but still worth checking.
  • And then for the one that caught me: hidden lists aren’t indexed!If you hide a list (SPList.Hidden), the search indexer won’t crawl it. That kind of makes sence. It would be kind of pointless to hide a list if people would then still be able to find it in search, right?I did read some articles mentioning that your list will still be indexed when it’s already in the search index (so it’s visible and indexed, and then you change it to be hidden). But I’m not sure if that’s true, or why you would use that (resetting the index will mean it’s then omitted from search).
  • And finally, make sure your search crawl account can actually access the list. But when you’ve got access rules setup on web application level, even fine-grained permissions won’t mess with that, so it’s not that likely your crawl account won’t have access.

I guess that’s them. Should I remember some more, I’ll add them. Or feel free to post more options in the comments and I’ll include them in the post. Thanks!

SP2010: BCS issue; CalculatePermissionsForCurrentThread

This probably is the last post in my latest BCS series for now, since our project is almost finished :) One of the last hurdles I had to take was an error which only occured in our production environment for some reason (I guess production and test still aren’t similar enough). It occurred when trying to get a single BCS entity in code and had something to do with the permissions not being valid. Continue reading

Meer = beter?

Ik wil het nog een keertje hebben over het aantal mensen waarmee we op deze planeet rondlopen. Kan zelfs een voorspelling doen dat dit een terugkomend onderwerp gaat worden, vooral omdat ik het zelf reuze interessant vind. Vind je dat niet, lees dan vooral niet verder.

Het bovenstaande plaatje zegt wat mij betreft genoeg. Goed, het vertekend wel een beetje ten opzichte van andere grafieken, maar dan nog steeds: het aantal mensen groeit wel erg hard, nietwaar? Ik denk (en hoop) dat iedereen het met me eens zal zijn dat zo’n sterke groei niet erg gezond is. Of in ieder geval dat we niet oneindig zo door kunnen blijven groeien, dat lijkt me toch een feit.

Het rekensommetje is wat dat betreft heel simpel. Ieder mens heeft basis behoeften om te kunnen leven. Water, voedsel, onderdak, dat soort dingen. En tegenwoordig komt daar energie nog bij en zijn de behoeften in de rijkere delen van de wereld (uzelf hoort daar ook bij) natuurlijk nog wat hoger dan ze vroeger waren. Dus voor iedere mens op aarde hebben we water, voedsel, plaats en energie nodig. Hoe meer mensen, hoe meer we nodig hebben. Simpel.

Dus pak dan bovenstaand plaatje en bedenk wat er met die behoeften gaat gebeuren wanneer het aantal mensen zo blijft toenemen. Dat grafiekje zal er grotendeels hetzelfde uitzien. En het zal niemand verbazen dat dat op een gegeven moment gewoon niet meer gaat. We moeten uiteindelijk zulke enorme hoeveelheden voedsel, water en energie gaan produceren dat we het onszelf wel erg moeilijk gaan maken. Waarom doen we dat eigenlijk?

Wat me opvalt is dat het ons altijd zo wordt ingewreven dat meer beter is. Waarom is dat eigenlijk zo? Waarom moet de economie per se groeien? Waarom worden steden over het algemeen alleen maar groter? En waarom moeten we met steeds meer mensen zijn? Het feit wil namelijk dat dat helemaal niet hoeft. Ik pak er nog even een grafiekje bij:

Deze grafiek laat zien hoeveel kinderen de Nederlandse vrouw heeft gekregen over de jaren heen. En kijk nu: dat aantal ligt op het moment zelfs onder de 2! Weer een simpel rekensommetje. Als ieder paar (man + vrouw) samen gemiddeld 1,8 kinderen krijgt, dan hebben we uiteindelijk dus juist minder mensen!

Maar waarom groeit de wereldbevolking dan nog steeds? Omdat dat cijfer lang niet overal onder de 2 ligt. En dat geldt met name voor de meest arme landen ter wereld, waar mensen nog 6 tot 8 kinderen krijgen omdat die voor de oude dag moeten zorgen. Maar die kinderen hebben we steeds meer kans op overleven, omdat we inmiddels steeds beter kunnen vaccineren, opereren en al wat meer. Dus blijven er gemiddeld meer dan 4 leven, en dan gaat het snel.

Dus is de kern van de oplossing best simpel als je er zo over nadenkt. We moeten ervoor zorgen dat die mensen minder kinderen nemen. En dat doen we door de behoefte aan veel kinderen weg te nemen. Hoe? Door ervoor te zorgen dat ze het net zo goed hebben als wij hier. Waardoor je helemaal geen 6 of 8 kinderen meer wil (uitzonderingen daargelaten). Pas dan zal de boel zich stabiliseren, iets wat gewoon onmiskenbaar hard nodig is. Het probleem is dat de aller armsten ons daar niet bij gaan of kunnen helpen. We zullen dat zelf moeten doen. En iets doen waar je zelf weinig mee opschiet, dat is toch maar een lastig iets, vind ik zelf ook.

In een volgende post zal ik eens wat initiatieven bespreken die je wellicht leuk of interessant vind. Tot dan kun je jezelf vermaken met deze filmpjes over hetzelfde onderwerp:

http://www.youtube.com/watch?v=fTznEIZRkLg
http://www.youtube.com/watch?v=JaF-fq2Zn7I

May I have your votes please

There we go again, I’ve got another idea. This time it’s about the new Publish option in Visual Studio 11 for SharePoint packages. Check it out (and perhaps vote) here: http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2745668-create-publishing-profiles-for-sharepoint-packages. Thanks!

SP2010: Assembly was requested for LobSystem with Name, but this assembly was not returned

Working my way through BCS, I encountered another error which seems to be pretty undocumented. It’s as follows:


Error while executing web part: System.InvalidOperationException: Unable to open the specified list item. ---> Microsoft.BusinessData.Infrastructure.BdcException: The shim execution failed unexpectedly - Assembly was requested for LobSystem with Name 'Company.Projects.Contoso.BCSLobSystem', but this assembly was not returned. SystemUtility of Type 'Microsoft.SharePoint.BusinessData.SystemSpecific.DotNetAssembly.DotNetAssemblySystemUtility' requires the assembly to be uploaded.. ---> System.InvalidOperationException: Assembly was requested for LobSystem with Name 'Company.Projects.Contoso.BCSLobSystem', but this assembly was not returned. SystemUtility of Type 'Microsoft.SharePoint.BusinessData.SystemSpecific.DotNetAssembly.DotNetAssemblySystemUtility' requires the assembly to be uploaded.

When you read my previous blog posts, you know I’m working in a multi tenant environment, which is linked to a non-partitioned BCS service application. I don’t know for sure if that has something to do with this, but I’m guessing it does.

I also wished I could explain to you what’s going wrong here, but truthfully I really can’t. What I can do though, is provide you with the solution I found after some struggling with BCS and Powershell. Because the error stated the assembly needs to be uploaded, I came accross the Import-SPBusinessDataCatalogDotNetAssembly function. That proved to be the solution to my problem. Use it like this:


$url = "http://www.contoso.com"
$assemblyPath = "C:\lobsystem.dll"
$lobSystem = "Company.Projects.Contoso.BCSLobSystem"

Write-Host "Adding assembly to LOBSystem"
$serviceContext = Get-SPServiceContext $url
$lobSystem = Get-SPBusinessDataCatalogMetadataObject -ServiceContext $serviceContext -BdcObjectType lobsystem -Name $lobSystem
Import-SPBusinessDataCatalogDotNetAssembly -LobSystem $lobSystem -Path $assemblyPath

After executing this, everything started working!

SP2010: A multi tenant BCS scenario

I’ve done some posts about multi-tenancy and BCS lately, but haven’t combined the two. So todays topic (and no, it’s not a joke…) will be BCS in a multi tenant environment. Mainly because you have some choices to make and I want to provide you with some input on which you might be able to make the right one :) Continue reading