In a previous post of mine I explained how to create managed properties and modify the search results page for a custom Protocol application. In this post I am going to continue from my previous example by modifying the advanced search tab.

The idea is to modify the search page in order to include some of my managed properties in the search query logic, add the “contains” and “does not contain” equation in my search expressions and limit the language query options to English an Greek only.

  • I navigate to the advanced search page and I go into edit page mode
  • I select the edit menu of the Advanced Search Box webpart and the Modify Shared Web part option
    image[18]
  • In the Advanced Search Box –> Properties –> I pres the … icon in the Properties field
    image_13
  • A new window appears with the XML format of the advanced search properties
    <root xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance%22>
    <Option Name=”AllowOpContains” Value=”False”/>
    <LangDefs>
    < LangDef DisplayName=”Arabic” LangID=”1″/>
    <LangDef DisplayName=”Bengali” LangID=”69″/>
    <LangDef DisplayName=”Bulgarian” LangID=”2″/>
    <LangDef DisplayName=”Catalan” LangID=”3″/>
    <LangDef DisplayName=”Chinese” LangID=”4″/>
    <LangDef DisplayName=”Croatian/Serbian” LangID=”26″/>
    <LangDef DisplayName=”Czech” LangID=”5″/>
    <LangDef DisplayName=”Danish” LangID=”6″/>
    <LangDef DisplayName=”Dutch” LangID=”19″/>
    <LangDef DisplayName=”Finnish” LangID=”11″/>
    <LangDef DisplayName=”French” LangID=”12″/>
    <LangDef DisplayName=”German” LangID=”7″/>
    <LangDef DisplayName=”Greek” LangID=”8″/>
    <LangDef DisplayName=”Gujrati” LangID=”71″/>
    <LangDef DisplayName=”Hebrew” LangID=”13″/>
    <LangDef DisplayName=”Hindi” LangID=”57″/>
    <LangDef DisplayName=”Hungarian” LangID=”14″/>
    <LangDef DisplayName=”Icelandic” LangID=”15″/>
    <LangDef DisplayName=”Indonesian” LangID=”33″/>
    <LangDef DisplayName=”Italian” LangID=”16″/>
    <LangDef DisplayName=”Japanese” LangID=”17″/>
    <LangDef DisplayName=”Kannada” LangID=”75″/>
    <LangDef DisplayName=”Korean” LangID=”18″/>
    <LangDef DisplayName=”Latvian” LangID=”38″/>
    <LangDef DisplayName=”Lithuanian” LangID=”39″/>
    <LangDef DisplayName=”Malay” LangID=”62″/>
    <LangDef DisplayName=”Malayalam” LangID=”76″/>
    <LangDef DisplayName=”Marathi” LangID=”78″/>
    <LangDef DisplayName=”Norwegian” LangID=”20″/>
    <LangDef DisplayName=”Polish” LangID=”21″/>
    <LangDef DisplayName=”Portugese” LangID=”22″/>
    <LangDef DisplayName=”Punjabi” LangID=”70″/>
    <LangDef DisplayName=”Romanian” LangID=”24″/>
    <LangDef DisplayName=”Russian” LangID=”25″/>
    <LangDef DisplayName=”Slovak” LangID=”27″/>
    <LangDef DisplayName=”Slovenian” LangID=”36″/>
    <LangDef DisplayName=”Spanish” LangID=”10″/>
    <LangDef DisplayName=”Swedish” LangID=”29″/>
    <LangDef DisplayName=”Tamil” LangID=”73″/>
    <LangDef DisplayName=”Telugu” LangID=”74″/>
    <LangDef DisplayName=”Thai” LangID=”30″/>
    <LangDef DisplayName=”Turkish” LangID=”31″/>
    <LangDef DisplayName=”Ukrainian” LangID=”34″/>
    <LangDef DisplayName=”Urdu” LangID=”32″/>
    <LangDef DisplayName=”Vietnamese” LangID=”42″/>
    </LangDefs>
    <Languages>
    <Language LangRef=”12″/>
    <Language LangRef=”7″/>
    <Language LangRef=”17″/>
    <Language LangRef=”10″/>
    </Languages>
    <PropertyDefs>
    <PropertyDef Name=”Path” DataType=”text” DisplayName=”URL”/>
    <PropertyDef Name=”Size” DataType=”integer” DisplayName=”Size”/>
    <PropertyDef Name=”Write” DataType=”datetime” DisplayName=”Last Modified Date”/>
    <PropertyDef Name=”FileName” DataType=”text” DisplayName=”Name”/>
    <PropertyDef Name=”Description” DataType=”text” DisplayName=”Description”/>
    <PropertyDef Name=”Title” DataType=”text” DisplayName=”Title”/>
    <PropertyDef Name=”Author” DataType=”text” DisplayName=”Author”/>
    <PropertyDef Name=”DocSubject” DataType=”text” DisplayName=”Subject”/>
    <PropertyDef Name=”DocKeywords” DataType=”text” DisplayName=”Keywords”/>
    <PropertyDef Name=”DocComments” DataType=”text” DisplayName=”Comments”/>
    <PropertyDef Name=”Manager” DataType=”text” DisplayName=”Manager”/>
    <PropertyDef Name=”Company” DataType=”text” DisplayName=”Company”/>
    <PropertyDef Name=”Created” DataType=”datetime” DisplayName=”Created Date”/>
    <PropertyDef Name=”CreatedBy” DataType=”text” DisplayName=”Created By”/>
    <PropertyDef Name=”ModifiedBy” DataType=”text” DisplayName=”Last Modified By”/>
    </PropertyDefs>
    <ResultTypes>
    <ResultType DisplayName=”All Results” Name=”default”>
    <Query/>
    <PropertyRef Name=”Author”/>
    <PropertyRef Name=”Description”/>
    <PropertyRef Name=”FileName”/>
    <PropertyRef Name=”Size”/>
    <PropertyRef Name=”Path”/>
    <PropertyRef Name=”Created”/>
    <PropertyRef Name=”Write”/>
    <PropertyRef Name=”CreatedBy”/>
    <PropertyRef Name=”ModifiedBy”/>
    </ResultType>
    <ResultType DisplayName=”Documents” Name=”documents”>
    <Query>IsDocument=1</Query>
    <PropertyRef Name=”Author”/>
    <PropertyRef Name=”DocComments”/>
    <PropertyRef Name=”Description”/>
    <PropertyRef Name=”DocKeywords”/>
    <PropertyRef Name=”FileName”/>
    <PropertyRef Name=”Size”/>
    <PropertyRef Name=”DocSubject”/>
    <PropertyRef Name=”Path”/>
    <PropertyRef Name=”Created”/>
    <PropertyRef Name=”Write”/>
    <PropertyRef Name=”CreatedBy”/>
    <PropertyRef Name=”ModifiedBy”/>
    <PropertyRef Name=”Title”/>
    <PropertyRef Name=”Manager”/>
    <PropertyRef Name=”Company”/>
    </ResultType>
    <ResultType DisplayName=”Word Documents” Name=”worddocuments”>
    <Query>FileExtension=’doc’ Or FileExtension=’docx’ Or FileExtension=’dot'</Query>
    <PropertyRef Name=”Author”/>
    <PropertyRef Name=”DocComments”/>
    <PropertyRef Name=”Description”/>
    <PropertyRef Name=”DocKeywords”/>
    <PropertyRef Name=”FileName”/>
    <PropertyRef Name=”Size”/>
    <PropertyRef Name=”DocSubject”/>
    <PropertyRef Name=”Path”/>
    <PropertyRef Name=”Created”/>
    <PropertyRef Name=”Write”/>
    <PropertyRef Name=”CreatedBy”/>
    <PropertyRef Name=”ModifiedBy”/>
    <PropertyRef Name=”Title”/>
    <PropertyRef Name=”Manager”/>
    <PropertyRef Name=”Company”/>
    </ResultType>
    <ResultType DisplayName=”Excel Documents” Name=”exceldocuments”>
    <Query>FileExtension=’xls’ Or FileExtension=’xlsx’ Or FileExtension=’xlt'</Query>
    <PropertyRef Name=”Author”/>
    <PropertyRef Name=”DocComments”/>
    <PropertyRef Name=”Description”/>
    <PropertyRef Name=”DocKeywords”/>
    <PropertyRef Name=”FileName”/>
    <PropertyRef Name=”Size”/>
    <PropertyRef Name=”DocSubject”/>
    <PropertyRef Name=”Path”/>
    <PropertyRef Name=”Created”/>
    <PropertyRef Name=”Write”/>
    <PropertyRef Name=”CreatedBy”/>
    <PropertyRef Name=”ModifiedBy”/>
    <PropertyRef Name=”Title”/>