Delen via


MOSS Search UI Architecture - Introduction

This blog posting applies to Microsoft Office SharePoint Server 2007.

To modify SharePoint’s default search behaviors, it’s important to understand how the user interface elements for search work together to specify a query, execute a search and display the results. The following high-level overview shows how searches are executed and displayed.

 

1. The search box near the upper right of most pages is a control that accepts search keywords and scope from the user, and passes them to the search results page using a query string and HTTP GET.

2. The search controls on the advanced search page accept keywords, scopes, languages and properties from the user, and passes them to the search results page using form variables and HTTP POST.

3. The search results page calls an internal class with the inputs it receives, which builds the query, issues the query against the index and receives the results. The internal class is implemented as a singleton: Microsoft.Office.Server.Search.WebControls.SearchResultHiddenObject

4. Web parts on the search results page retrieve their portion of the results from the internal class to render their specialty: core results, high confidence results, page number, summary or statistics.

This architecture provides a very powerful and flexible way to configure different types of search results. Unfortunately it is restricted to Keyword Syntax queries and is not possible to take advantage of the search engine's ability to use SQL Syntax queries, without development effort. The development effort could be rather significant, because the internal class that performs the keyword syntax search is not available for custom class derivation.

 

For the form fields used from the Advanced Search page, here's a table of form fields that I came across. It was constructed using reflector and reverse engineering of search and search result pages.

Forms Param

Used for

Legal values and comments

ASB_OT_

?

?

ASB_TQS_AndQ_tb

AND query text

Url encoded string

ASB_TQS_PhraseQ_tb

Phrase query text

Url encoded string

ASB_TQS_OrQ_tb

OR query text

Url encoded string

ASB_TQS_NotQ_tb

NOT query text

Url encoded string

ASB_SS_scb_<index>_<scopeidnumber>

Site Scope

<index> is the selected index number value (0 based)

<scopeidnumber> is an integer value identifier the selected scope

When submitted the selected properties are included and the values are "on".

If a property is not used then the form data is not included.

ASB_SS_lcb_<number>_<lanuagecode>

Language scope

<number> is index number of language (0 based)

<languagecode> is an know number identifier for language.

All the language codes can be found in the Properties property of the advanced search web part.

Forms data is not there if none are selected

ASB_SS_rtlb

Document type scope

Legal values from adv search box are:

"default "= all

"documents"=Documents

"worddocuments"=Word documents

"exceldocuments"=Excel documents

"presentations"=Presentations

ASB_PS_plb_<propnumber>

Property name

<propnumber> runs from 0 to 5

Contains "(pick property)" if there is no content

ASB_PS_olb_<propnumber>

Property operator

<propnumber> runs from 0 to 5

Contains "contains" if there is no content

ASB_PS_pvtb_<propnumber>

Property value

<propnumber> runs from 0 to 5

Is null if there is no content

ASB_PS_lolb_<propnumber>

Property operator (between expressions)

And/Or boolean expressions expected

Form data is included if the property expression is followed by a new property expression

ASB_TextDT_Props

Text properties

#;# seperated field

ASB_DateTimeDT_Props

DateTime properties

#;# seperated field

ASB_ResType_Query

Type of search

FullTextQuery, if form data is available otherwise Keyword query

ASB_BS_SRCH_1

The search button

Search

Comments

  • Anonymous
    November 06, 2007
    Hi Mark: Do you have any detail info about the second point, specilly the form variables. Thanks for your post, it helped me lot. Regards, Robert

  • Anonymous
    November 08, 2007
    Robert, I added a table of form fields that a colleague of mine put together.

  • Anonymous
    December 19, 2007
    Dear Mark: You are my saver! Thank you so much. Regards, Robert