SSDS SDK (Beta)

Although SSDS (SQL Server Data Services) is in private Beta status, but we've got SSDS SDK Beta since last week! This contains a Command Line Tool, and the SSDS Explorer.

SSDS Explorer is for give us GET, POST, PUT, DELETE and Query functions to our SSDS items (entites, containers, authorities).

image

But SSDS Explorer doesn't support every function contained in Command Line Tool (for example backup/restore, blog data handling).

SSDS SDK can be downloaded here.

Technorati Tags: ,

MOSS Search: Custom Search pages and Property mappings

After a basic introduction let's see, how you can build a custom search page, and Property mappings. This post will built on traditional method without Infrastructure Updates, but in the next part we'll see the Updates details as well.

Step 0: Set the basic search

See my previous post and practice the details described there.

Step 1: Create lists and libraries

In my example, we'll use the following scenario: the site collection contains several lists and document libraries, that are responsibe for question-type items, and answer-type items. Of course, these items are connected into question-answers pairs. The main goal is to build a custom "Search for Questions and Answers" ("Kérdések és Válaszok keresése") page.

image

So, what do we have to do being able to build this page? First of all, the "backend"-structure: content types and lists, with indexed columns. After that we nees property mappings. Finally: build this Search page and customize some XSLTs. Let's see what does it mean.

Step 2: Search scope settings

Basically we need the basic content types: Question and Answers. In the lists we use them instead of Item, so we can define custom search scopes based on them: One scope is for Questions, and the other is for Answers. Oops, but by default we cannot use Content Type in the scopes. Don't worry, just go to the Search settings on Shared Services Administration page, and open Metadata Property Mappings. Here you can find the "Content Type" property – open it, and check the "Allow this property to be used in scopes" box in. Then you can use it in your scopes:

image

Well, currently we have lists with our content types, and scopes that can be used for searching Questions and Answers. So we can use them on my custom search page as well (see Step 4).

Step 3: Set the Property mapping

Of course, our content types contains custom fields as well. For example Program, Document Type, Construction, Keyword, etc. These fields have to be able to search on our custom page, so we should set them as indexed columns in every related list.

After that, we have to set these fields as searchable properties. Go to the Metadata Propery Mappings page again, and choose New Managed Property option. Add a name to this mapped property (for example, Program), and optionally a description. Select the type (Text), and click Add Mappings button – here you can search for the required field, in this example Program:

image

OK, let's map it! We're ready to build the full Search page now.

Step 4: Create custom Search page

First of all, create a custom advanced search page: content type choosing and property searching.

For using Question and Answer content types, you have to define a new scope display group. Go to your site collection's administration page, and shoose Search Scopes option. Here you can define a new Display Group (Questions and Answers – Kérdések és Válaszok), and add your content types to it.

After that, go back to your custom search page, and modify the properties of the Advanced Search Box, and change the Display Group to Questions and Answers:

image

The result: on your page you can choose your content types instead of the default ones.

OK, we're almost ready. Almost. We have to set the property search as well. We have indexed fields and mapped properties, so let's edit the Properties' XSLT. Search the PropertyDefs tag, and add your properties one by one as PropertyDef nodes:

<PropertyDefs>        
    <PropertyDef Name="Program" DataType="text" DisplayName="Program" />        
    <PropertyDef Name="DocumentType" DataType="text" DisplayName="Dokumentumtípus" />        
    <PropertyDef Name="Construction" DataType="text" DisplayName="Konstrukció" />
</PropertyDefs>    

After PropertyDefs, you can find a node named ResultTypes. In this you can define what kind of properties do you want to use on your search page:


<ResultTypes>
    <ResultType DisplayName="Minden eredmény" Name="default">
        <PropertyRef Name="Program" />
        <PropertyRef Name="Dokumentumtípus"/>
        <PropertyRef Name="Konstrukció" />
    </ResultType>    
</ResultTypes>

Finally save the Advanced Search Box web part, and let's try your brand new Search Page. Persuasive, isn't it?…


Technorati Tags: ,,

Clock adjustment

One of our customers called me doubtfully: he was testing a custom SharePoint Designer workflow on their MOSS production server, and he would need some fire fighting: he set the server's time forward with 24 hours, then back. That was OK, but some things went wrong immediately: the main page gave "The Context has expired and can no logner be used." error message; the Content Query web parts returned with empty content; etc.

Althought the trouble was really serious (their full intranet was unabéle to work properly) the solution was quite simple: restart all SharePoint services, then run an iisreset. That's it, everything is working again.

Just a little "spillover": the current alerts were sent again for the users.

Hungarian SharePoint User Group (HUNSUG)

Hugarian SharePoint User Group (HUNSUG) is coming soon! With the help of ISPA, I became an ISPA Evangelist and can start User Groups and other professional communities in Hungary.

"The International SharePoint Professionals Association (“ISPA”) is the first independent, community-run, not-for-profit organization designed specifically for SharePoint Professionals. ISPA is a professional association dedicated to the promotion and global adoption of Microsoft SharePoint Products and Technologies.  The Association provides support and guidance to the community  by establishing connections between SharePoint professionals and groups, resources, education and information."

With the other Dotneteers we'll start a new event series in Hungary, where all of our topics will be included. The first event will be on Sept 10, and bring together the HUNSUG with the other Hungarian Dev User Groups.

See this site for more details (in Hungarian)!

Technorati Tags:

Web Applications and Content Databases

In SharePoint 2007, every Web Application has its own content database(s). Yes, the WebApps can contain more than one Content Database – moreover, we can change the default content DB.


Why is it important for us? Just for fun? – No, of course.
It can be important, for example, if we have to move a full site with all content. The steps of creating the new Web Application with the original content are the followings:


  1. Create the new Web Application on the Central Administration site. You have to give a name for the Content Database – as it's a temporary DB for you, call "ContentDB_Tmp".
  2. From this point forward, you can choose the Central Admin UI or stsadm. I like stsadm better, so let's see, how we can change the Content DB with the help of this command.
  3. First of all, if you're not sure in the related content DBs, run the following stsadm command:
  4. stsadm -o enumcontentdbs -url http://mymoss
    <Databases Count="1">
    <ContentDatabase Server="MYDBSERVER" Name="ContentDB_Tmp" />
    </Databases>
  5. Now you have the exact name of the temporary content database (ContentDB_Tmp). Let's delete it!
  6. stsadm -o deletecontentdb -url http://myserver -databasename ContentDB_Tmp -databaseserver MYDBSERVER
  7. Well, currently we have an empty Web Application with no Content Database. Let's add the original one, called ContentDB_FullContent!
  8. stsadm -o addcontentdb -url http://myserver -databasename ContentDB_FullContent -databaseserver MYDBSERVER
  9. That's all! To check your results, run the following command again:
  10. stsadm -o enumcontentdbs -url http://mymoss
    <Databases Count="1">
    <ContentDatabase Server="MYDBSERVER" Name="ContentDB_FullContent" />
    </Databases>