/ #search 

Basic Search – Display Different Columns

So another minor post about search. Last post
I explained the use of metadata property mappings, and their strength allowing you
to show more information without a lot of changes. However I forgot to mention the
fact that u can actually show them pretty easy in your existing search results.

Assuming you created your Metadata properties
you can go to your search page, the XSLT of your resultswebpart to:

xmlversion="1.0"encoding="UTF-8"?>

      xsl:stylesheet</spanversion=“1.0”xmlns:xsl=http://www.w3.org/1999/XSL/Transform">

<p>
  </span></strong>
</p>

<p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;">
  <strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><span style="mso-tab-count: 2;">            </span></span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><xsl:output</span><span style="font-size: 10pt; background: white; color: red; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">method</span><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">=</span><strong><span style="font-size: 10pt; background: white; color: #8000ff; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">"xml"</span></strong><span style="font-size: 10pt; background: white; color: red; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">version</span><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">=</span><strong><span style="font-size: 10pt; background: white; color: #8000ff; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">"1.0"</span></strong><span style="font-size: 10pt; background: white; color: red; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">encoding</span><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">=</span><strong><span style="font-size: 10pt; background: white; color: #8000ff; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">"UTF-8"</span></strong><span style="font-size: 10pt; background: white; color: red; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">indent</span><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">=</span><strong><span style="font-size: 10pt; background: white; color: #8000ff; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">"yes"</span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">/></span><strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"></p> 

  <p>
    </span></strong>
  </p>

  <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;">
    <strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><span style="mso-tab-count: 3;">                  </span></span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><xsl:template</span><span style="font-size: 10pt; background: white; color: red; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">match</span><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">=</span><strong><span style="font-size: 10pt; background: white; color: #8000ff; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">"/"</span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">></span><strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"></p> 

    <p>
      </span></strong>
    </p>

    <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;">
      <strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><span style="mso-tab-count: 4;">                        </span></span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><xmp><xsl:copy-of</span><span style="font-size: 10pt; background: white; color: red; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">select</span><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">=</span><strong><span style="font-size: 10pt; background: white; color: #8000ff; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">"*"</span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN">/></xmp></span><strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"></p> 

      <p>
        </span></strong>
      </p>

      <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; mso-layout-grid-align: none;">
        <strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"><span style="mso-tab-count: 3;">                  </span></span></strong><span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"></xsl:template></span><strong><span style="font-size: 10pt; background: white; color: black; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"></p> 

        <p>
          </span></strong>
        </p>

        <p class="MsoNormal" style="margin: 0in 0in 5pt; line-height: normal; mso-layout-grid-align: none;">
          <span style="font-size: 10pt; background: white; color: blue; font-family: 'Courier New'; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN; mso-highlight: white;" lang="EN"></xsl:stylesheet><br /> </span>
        </p>

        <p class="MsoNormal" style="margin: 0in 0in 10pt;">
          <span style="color: #000000; font-family: Calibri; font-size: medium;">(More info on that on a <a href="http://blogs.tamtam.nl/appie/2009/01/14/XSLTTricks.aspx">previous<br /> post</a> </span><span style="color: #000000; font-family: Calibri; font-size: medium;">on this blog) . </span>
        </p>

        <p class="MsoNormal" style="margin: 0in 0in 10pt;">
          <span style="color: #000000; font-family: Calibri; font-size: medium;">Next step will be a minor change in Results<br /> Query Options, here you will have a property for Selected Columns, editing it will<br /> show you the normal columns used in your search results before the end </Columns><br /> you can easily add a new <Column Name=”YourMetaDataProperty” />. By using the<br /> above XLST you can save the page search, and check real-time whether your column exists<br /> and contains information. </span>
        </p>

        <p class="MsoNormal" style="margin: 0in 0in 10pt;">
          <span style="color: #000000; font-family: Calibri; font-size: medium;">You might have to play with capitalization<br /> a bit, ‘cause sometimes the column name differs from the metadata property. </span>
        </p>