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

Im trying to search on the managed property numcomments. This property is the number of comments stored for a blog post. The proprty is a text field which means if im also sorting by it, 11 comes before 2.
Ive tried to create a new manage property mapping to comments but storing it as an integer. No results are showing in search when i search by this new managed property term.
Is there a way to store text data, in an integer search managed property. I think the reason why ows_comments is a text field instead of a integer might have something to do with it being a lookup column.
I really need to call a keyword search in code and sorting by numcomments correctly. Can anyone suggest anything?

share|improve this question

1 Answer 1

You have to use a pipeline extensibility stage which reads the text based property and writes it back to a new crawled property of type int, which you can map to an int based managed property.

I've done the same for date <meta> tags in web pages which are interpreted as text, but you want them as dates.

I have a powershell prototype sample here which you can use as a basis to test this: http://techmikael.blogspot.se/2011/03/prototyping-pipeline-stages-in.html

share|improve this answer

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.