views:

157

answers:

0

I am trying to get all users in a department from User Profiles using FullText Search. I have used the following query:

SELECT  AccountName FROM scope() WHERE  ( ("SCOPE" = 'People') ) and (department = 'HR')

I am getting empty result set for this.

But, the following query returns results for all records which contains the text 'HR':

SELECT AccountName FROM scope() WHERE  ( ("SCOPE" = 'People') ) and Contains(department, 'HR')

It means that department field is searchable.

I want to get all account names with specific department which should have achieved using '='. Can someone tell me if I am doing anything wrong in the first query?

Thanks in advance!