6

I have the following:

  • A library of XML files.
  • An aspx page (I guess an "Application Page") that takes the name of one of these files as a query-string parameter and renders it to HTML.
  • A way of listing the XML files, but with links to the aspx page using the correct query-string rather than the XML file itself. This means the users don't ever see the XML files (unless they go looking for them, which isn't really a problem); they just get the nice rendered output.

This is all fairly clunky, but works. (Basically I've been asked to take an existing XML-to-HTML rendering system and use SharePoint for version control, access etc.)

However, where it really falls down is in searching the files. I'm using Search Server Express, and I think I'm just indexing the content of the XML files. This means I can search inside the files, but the links (and titles) I get in the search results point at the XML files.

What I'd like is for the search results to link to the aspx page, with the correct query-string parameter, rather than the XML files.

A bonus would be to have SSE actually crawl the rendered output of the aspx page rather than the XML source files, but this is secondary to just having the links point to the right place.

Any ideas?

1 Answer 1

4

This can be achieved by defining your content sources and crawl rules so that it crawls only the pages you want - i.e. the aspx pages but not the xml files. These are configured from the Search management page in Central Administration.

You can also configure search to omit all XML files by going to the Manage File Types page if you want to prevent crawling of XML files entirely.

You will need to create some kind of "index page" containing the links to your aspx page with the various different query string parameters. You could perhaps use a Content Query Web Part or XsltListViewer to do a roll-up of all the XML files and an XSLT transformation to create the links to the aspx page. When you crawl this page it will put all the URLs for the aspx page into the search index.

13
  • I've managed to use a crawl rule to exclude the XML files; however, I've not managed to include the aspx page. I essentially need to tell the crawler "crawl this aspx page several times, using each of the following query strings", but don't know how to do that.
    – Rawling
    Commented Apr 5, 2011 at 10:14
  • 1
    Okay, crawl the XML files but just to follow links, don't index the XML file itself. This is set using a crawl rule by setting path wildcard, then check "Include all items in this path" and then choose "Follow links on the URL without crawling the URL itself".
    – SPDoctor
    Commented Apr 5, 2011 at 10:29
  • I'm assuming the XML file contains the link to the aspx page...
    – SPDoctor
    Commented Apr 5, 2011 at 10:30
  • 1
    Things to check: web parts indexing enabled in site settings (search and offline availability); crawl account has access to your index page. Check crawl log for index page.
    – SPDoctor
    Commented Apr 5, 2011 at 13:24
  • 1
    Got it working now. The trick was not only to add the index page as a content source, but add a Crawl Rule, matching the aspx-plus-query links, with the "Follow Complex URLs" option set.
    – Rawling
    Commented Apr 6, 2011 at 7:50

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.