Virtual Earth Map in SharePoint Search Results
16. March 2009 09:15

I often integrate Virtual Earth / Live Maps into MOSS because It's a relatively easy way to add some interesting and useful interaction without any custom code.

I wanted to share with you the 'default' XSL template I typically start from for generating a Virtual Earth Map in my MOSS search results.  From here, I make whatever enhancements or customizations I want, which I'll describe more in a moment.

The prerequisites here are that you have managed columns with Latitude and Longitude that are coming back in your search results (which means you've updated the columns XML to include them on the settings of your search core results webpart)

Here's an example of the managed columns I've got, and will be using -- It's simply an addition of Lat and Lon, and utilization of the existing Title column.  On the right is my updated XML that goes in the columns property of the core results part:

image image

This data could come from a BDC connection to an external data source (e.g. SQL), or you could have a content type or list that has the Lat/Lon information in it.

(If you have a big list or table of data with addresses, and want to generate the coordinates for them, I recommend using this tool: http://www.batchgeocode.com/, You can export your list to excel, save as a delimited format, geocode, and re-import)

So once you have your columns available, this is the base XSL you can put in your core results part to generate a map, and put Push Pins with a popup for the Title at all the correct locations:

 

maptransform.xsl (2.34 kb)

 

The XSL does the following:

  1. Create a div for the map
  2. Includes the Virtual Earth javascript
  3. Write javascript for creating the map, creating a shape array, and pushing the CreateMap function into the body load for sharepoint (_spBodyOnLoadFunctionNames)
  4. Use the XSL to generate a bunch of calls to "Add Shape" based on the search results, to add in all the points.  You could expand this to add any HTML into the pushpin popup, such as content from the result item.

 

You will need to update the Map.LoadMap call to set the zoom level and coordinates to center on (currently its in Redmond, Washington, at a high zoom).

You can build on this using the ability to drag areas of the map to refine search results, or use the built in clustering ability to cluster large groups at different zoom levels.

Good luck!

Tags: , , , , Comments (2) | Permalink
Optimize MOSS Search Indexing
9. December 2007 18:35

Joel Oleson had some great suggestions for increasing SharePoint Index performance.  A lot of these go for your farm performance in general.

There are at least two that would not have occurred to me, make sure you take a look:

  1. Put your Search db and on separate disks transaction logs, both the fastest most optimized disks with fast optimized spindles for writing (dedicated disks are essential)
  2. Optimize your temp db: grow it, give it space, you can even split it into multiple dbs and ensure it is on the most optimized disks  (dedicated disks are essential).  Don't forget to optimize the transaction logs of the temp db either!
  3. Optimize the network between the servers you are indexing and the index server (GB NIC speed is preferred within a farm)
  4. Consider topology changes to optimize network throughput and eliminate double hops.
  5. Increase the your RAM on your x64 SQL Servers (8 GB is really a good place to start, 16 GB or more is looking better and better.)
  6. Defragment your databases, and applicable drives (if fragmented) and run relevant dbcc consistency checks - Refer to KB on SharePoint Safe DBCC commands
  7. Increase the # of crawl threads (you'll have to watch this, it is the easiest way to speed up your crawls, but watch the box it is "attacking" it can be heavy handed.)
  8. Reduce the maximum index file size (optional)
  9. Remove any unused, single threaded and poor performing ifilters
  10. Reduce the amount of full indexes, run incremental crawls on a schedule where they can complete, and remove non essentials such as every 5 minute incremental jobs these will simply cause unnecessary churn.
Tags: , Comments (0) | Permalink