Entities with underscores in their DisplayName cannot be found?
This looks like a bug in FIM, but I can't be sure. Can someone enlighten me please?
I've created two resoruces in FIM with the following display names:
normal-test underscore_test
If I search for "test", I find only normal-test. The one with the underscore in is ignored.
The first thing I thought of is this is a bug, perhaps FIM is having problems with the underscore (which is a reserved keyword in SQL Server), so did some SQL Profiling, and found a NASTY query with the following relevant part:
SELECT
valueOfProposition0.ObjectKey,
valueOfProposition0.ObjectTypeKey
FROM [fim].ObjectValueString AS valueOfProposition0
WHERE
(
(
(valueOfProposition0.ObjectTypeKey = 32687) /*Country*/
)
AND
(valueOfProposition0.AttributeKey = 66) /*DisplayName*/
AND
(CONTAINS(valueOfProposition0.ValueString,N''"test*"''))
I've done some full-text query work before in SQL Server and tried playing with the Cotains predicate but couldn't get the result I wanted.
If I look in the [FIM].[ObjectValueString] table, I can find both display-names using a "like '%test%'" query.
Anyone else had any experience with this?
November 17th, 2010 7:08am
I have no problems with underscores at all
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 8:46am
show your search scope configuration: you might be searching on wrong attribute
November 17th, 2010 8:48am
I think there are issues with underscore in starts-with() which means any attribute other than DisplayName in a SearchScope. Don't think it's an allowed character from that perspective. Can't remember. There's something in the release
notes.
IIRC I've also experienced issues with underscores in contains() (i.e. against DisplayName, specifically before a clause, e.g. in Evgeniy's example _ETG might fail whereas ESPG doesn't).
What you can do is use the SQL wildcard though, e.g. in your case: %test
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 5:11pm
Paul, you're partially right - search for _ETG will find nothing
But the reason is not the underscore itself. Search for 'hat' will also find nothing - it looks like search works on words or on their first part.
So, in my example ESPG, ESPG_, Group, Grou or Chat will find that role. But '_', _ETG, hat, '(' or ')' will not.
going back to original request for 'underscore_test' to be found with 'test' search request - yes, it won't work.
it might be confusing that FIM 'contains' really does 'test%' and not '%test%'. but
I don't think its a bug.
November 18th, 2010 2:28am
Evgeniy, what happens if you search for "ETG Chat Room"? It's the latter-part I am unable to match on.
Here's the search-scope for the country page:
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2010 6:49am
Sure to say "ETG Chat Room" will not find anything as 'ETG' is not the beginning of the word 'ESPG_ETG'
It will not even find it if the role will be named 'ESPGETG Chat Room' - without underscore.
November 19th, 2010 6:56am
FIM executes a full-text CONTAINS search, not a like 'term%' one, at least not from what I can see.
I get a single result for "country" when the two records available are:
Normal-Country Underscore_Country
Is this a difference in our configurations?
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2010 8:07am
no differences. if I would search for 'country' I would also get only 'normal-country' in results.
I don't know how full text search works in SQL, but it looks for me that it divides Normal-Country into 2 words and sees Underscore_Country
as 1 word.
so only Normal-Country
is returned in results.
ps. why do you need that underscore in Country name/ISO code at all?
November 19th, 2010 8:11am
I don't know if this will help, but when I had some weird search behaviour I was told to rebuild the catalog:
http://social.technet.microsoft.com/Forums/en-US/ilm2/thread/e145a780-c743-4820-8ec1-15a51f00c71d
http://www.wapshere.com/missmiis
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2010 8:22am
that was easy - no need to rebuild the catalog
just talked to our DBA, this is how SQL Full Text search wordbreaker works:
So this is the answer
November 19th, 2010 8:28am