Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to da a keywordquery because it shoul work with Sharepoint Enterprise and FAST Search. And all i want is to get the 10 last modified documents from a search application.

My problem is, that i can't get the column ModifiedBy. I'm adding the column this way:

keywordQuery.SelectProperties.Add("ModifiedBy");

But when I execute this query I get the following error:

Property doesn't exist or is used in a manner inconsistent with schema settings.

There is a similar article on the problem but there query should bring only documents from a special author. KeywordQuery with "last modified by" and "last modified date"

Can somebody help?

share|improve this question
add comment

2 Answers 2

The ModifiedBy column has to be accessed as 'Author', you don't have to specify a specific value as stated in the link you provided. To get ModifiedBy back, use Author.

share|improve this answer
    
Sorry that doesn't work. I edited a document with another user -> Column Modifiedby at the library changed -> made full crawl -> Author hasn't changed –  Steffen Schindler Aug 26 '11 at 9:58
add comment
up vote 0 down vote accepted

Ok I achieved it in the following simple way. I set the Maanged Property "ModifiedBy" to retrievable. Done it the following way:

                SearchServiceApplication searchApplication = SearchService.Service.SearchApplications.GetValue<SearchServiceApplication>(searchApplictionInfo.SearchServiceApplicationId);
                var searchSchema = new Schema(searchApplication);


                ManagedProperty managedProperty = searchSchema.AllManagedProperties["ModifiedBy"];
                managedProperty.Retrievable = true;
                managedProperty.Update();

This way you can access "ModifiedBy" through Keywordquery.

share|improve this answer
1  
You could try to use the property "write" instead, which is what FAST uses for the last modified date. –  Mikael Svenson Aug 31 '11 at 8:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.