1

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?

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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