Search Core Results Web Part: Want to return the image within the body of a Blog Post

Hi,

I created a search core results web part that returns the most recent posts in a blog list format. Now, I am trying to display the image (if there is one) that is located in each individual post, but I can't figure out any way to do this.

What I tried so far is creating a new Managed Propert in Central Admin that maps the Crawled Property "ows_body(text)." This does return the body of the post, but only the text portion. There is no reference to the image inside the body at all. I also tried mapping the Crawled Properties "ows_Image(text)", "ows_Picture(text)",  and "ows_PictureURL(text)." All of these returned blank when I added them to the search core results web part.

Does anyone know how to solve this issue? Is it even possible?

Thanks.

July 11th, 2013 10:34pm

Hello,

Thank you for your question.

We are trying to involve someone familiar with this topic to further look at this issue.

This may take some time. Thanks for your patience.

Thanks,

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2013 3:05am

Hi budward1,

i think the main issue is because the picture was not crawled, so it was not appear.

i found this workaround that perhaps able to help you:

You need to add the url to the image to the Pages Library List. We used the column "comment" for that purpose. We provided an EventHandler which receives and handles the events "ItemUpdating" and "ItemAdding" events(executed if you change or add a picture to the picture library).

public override void ItemUpdated(SPItemEventProperties properties)

        {

            SPListItem item = properties.ListItem;

          string imageUrl = ((Microsoft.SharePoint.Publishing.Fields.ImageFieldValue)(item["PublishingPageImage"])).ImageUrl;

            item["Comments"] = imageUrl;

            item.Update();

        }

Use this picture library for adding picture to the web parts "Page Image" or "Rollup Image".

Run a full crawl. Map the meta property ows_Comment to the column "Comment". Run a crawl again. Used this property name in the Search results Core Web Part in the query options and modify the XSLT.

some other examples articles you may find on this links:

http://blogs.technet.com/b/ptsblog/archive/2011/08/31/sharepoint-2010-returning-document-id-in-search-results.aspx

http://www.ableblue.com/blog/archive/2008/09/01/sharepoint-image-search-part-4/http://edithzor.wordpress.com/2011/06/06/crawling-publishing-images-in-sharepoint-2010/

July 16th, 2013 6:13am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics