Adding, Editing and Deleting Searchable Properties
To configure searchable properties:
1. Go to the Search Tabs page for the site level at which you want to create the new searchable property as described in “Search-Tab Configuration and Inheritance”.
2. Click on the search tab for which you want to modify properties and select Configure Search Tab from its action menu. This opens the Search Tab Configuration page.
3. Click on the Searchable Properties link under the Property Settings heading on the Search Tab Configuration page. This brings you to the Searchable Properties page.
4. Use the toolbar and action-menu commands on the Searchable Properties page to add, remove, arrange, copy and/or edit your properties (see also “The Searchable Properties Page” for details about these controls).
When you are adding a new property, you will see the Add Searchable Property page. When editing an existing property created at the current site level, you will see the Edit Searchable Property page. When editing an existing property created at a higher site level, you will see the Overwrite Searchable Property page. When you are creating a copy of an existing property, you will see the Copy Searchable Property page. Each of these pages includes the same collection of settings, which are described below.
Figure: The searchable-property configuration page
Searchable Property Configuration Settings
Most of the settings on the Add/Edit/Overwrite Searchable Property pages are very straightforward and apply to all types of properties. Some settings are somewhat more complex; further details about these are described in the sections below. The following settings are provided:
• Name and Description > ID: Enter a unique ID for the property. Do not use spaces.
• Name and Description > Name: Enter a display name for the property. This is the label shown for the property in search forms where it appears and also in the list on the Searchable Properties page.
• Name and Description > Description: Enter a short description for the property. This will be shown next to the name in search forms where the property appears and will also appear as a tool tip on administration pages (such as the list on the Searchable Properties page).
• Alternative Names: Alternative names can be used when constructing query strings using the advanced Search & Preview syntax. You can always use the ID (described above), but if you would like to use (typically shorter) alternatives, then you can enter them here. If you would like to make more than one, then separate each of them with a carriage return.
• Property Group: Each searchable property must belong to exactly one property group. To add the current property to an existing group, select the appropriate group name from the drop-down list. To create a new group, click on the New Group button. See also “Working with Searchable Property Groups” for more information about searchable-property groups.
• Property Mode: Select a radio button to create either a Mapped Property or Query Property. Mapped properties map directly to a managed property established in SharePoint. Query properties add a pre-configured query to the search (configured using the advanced Search & Preview syntax). The selection you make here will affect the controls offered at the bottom of the page (see below).
• Property Mapping: This control is only available for mapped properties. The drop-down list here shows the name of each available managed property. Select the managed property in which your searchable property should search.
• Operators: Use these settings to control which type of operators will be shown as options in the search form and how they will be identified; however, if you select only one, then that operator will always apply and no operator option will be shown in the form. Only those operators that are relevant for the data type of the managed property you selected for the Property Mapping are listed here. These settings are therefore available only once you have selected a mapping and may change if you modify the mapping. Mark the Enable checkbox for each operator that you wish to make available to users in the search form and edit the Display Name as needed (for example, to translate to a new language).
• Property Values: The settings in this section enable you to control the options available for users when specifying values for the search. For mapped properties, you will be able to decide which types of input controls are available and establish the choices available. For query properties, you will be able to define the available queries and the user controls for selecting them. See below for details about each type.
• Target Audiences: Use this setting to limit the types of users that will see the current searchable property. Enter one or more audience names (separated by semicolons) to limit the audiences to which the current property will be shown. Leave this setting blank to show the property to all users. See also “Target Audiences in Search & Preview” for details about this setting and its helper controls.
Providing Property Values for Input Controls—Overview
To better help users make valid searches, you might design your search forms to provide input controls that include suggested values. For example, if your search form enables users to search by file type (HTML, PDF, Word, etc.), then you might provide a drop-down list of valid file types, rather than leaving the user to guess about how to specify a given file type (e.g., as “Word”, “MSWord” or “.doc”).
There are three basic ways of defining the collection of options provided for any given input control:
• Define the values manually: Create your own list of display and submit values for the control. See “Using Property Values Based on a Custom List” for instructions.
• Take values from a SharePoint List: Take the values from an existing SharePoint list. The list can be part of the local SharePoint site, or can be drawn from a remote site via a URL. There are furthermore two ways to use a SharePoint list; these are summarized in the list below.
• Take values from a remote Web Service: Call a remote system that supplies a Web Service that will return a set of input options. See “Using Property Values Drawn from a Web Service” for instructions.
The standard SharePoint lists feature mentioned in the list above provides a convenient way to manage all types of lists used throughout your site. See also your SharePoint documentation for details about creating and managing lists. There are two ways of using a SharePoint list to provide input values:
• Choice column values: Takes all unique values found in a given column of a given list. Use this option for lists that have many items but just a few unique values for your selected column. For example, if you will reference the “status” column for a list of documents, then use this option because there is probably just a few status values for an otherwise long list of documents. Instructions for using this option are described below under “Using Property Values Based on Choice Column Values from a SharePoint List”.
• *List values *Takes a value from a given column for each row of a given list. Use this option for lists where each row is likely to have a unique value in a selected column. This option enables you to select separate display and submit columns and also to use a list view to fine-tune the content and sorting of the input options. Instructions for using this option are described below under “Using Property Values Based on List Values from a SharePoint List”.
Use the settings in the Property Values area to select and configure these features. See below for details about each option.
Using Property Values Based on a Custom List
If you wish to provide a set of value options that does not already exist as a SharePoint list (and it would not be useful create one), then you can instead create a custom list that applies only to a single property. To do this, configure a search property as described above and then set the Property Values settings to User defined values. The page then reloads to provide the Value Data and Value Selector controls, which enable you to enter values for your list and control how they are presented to the user.
The Value Data table shows the list of values that are currently available (if any).
Use the buttons at the top of the table to work with the list as follows:
|
Click here to add a new value to the table. This opens the Property Value pop-up window, which enables you to define the value (see below). |
|
To edit an existing value in the table, select the target value and then click here. This opens the Property Value pop-up window, which enables you to define the value (see below). |
|
To remove an existing value from the table, select the target value and then click here. |
|
The values will be displayed in the search form using order indicated by the table. To move an existing value up in the list, select the target value and then click here. |
|
To move an existing value down in the list, select the target value and then click here. |
When you choose to edit or create a new value row, the Property Value pop-up window is displayed to enable you to define the value with a name, submit value, abbreviation, and icon.
Make the following settings in the Property Value window:
• Display Name (required): Enter the value as it should be presented to the user.
• Value (required): Enter the value that should be submitted to the search engine. This is often the same as the display name, but not necessarily so.
• Icon URL (optional): If you would like to display a small icon next to the value, then enter the URL for that icon here.
• Abbreviation (optional): If you would like to use the Search & Preview search syntax to write queries that use this value, and then use this setting to establish a short term for the current value.
Click on OK when you have finished defining the value.
Once you have finished setting up the value table, make the following settings to control how the values will be presented to users:
• Value Selector: Choose the type of control you would like to provide: “drop-down box” or “Lookup dialog”. A drop-down box shows all available values, including one for an empty selection. A lookup dialog provides an input field in which the user can begin to type, with matches from the specified list shown based on the characters typed so far. Use a drop-down list when there are relatively few values; use a lookup dialog when there are many values in the list.
• Specify … empty selection: This setting is only provided when you have chosen “drop-down box” for the setting above. Enter the text to show for the list-box item that equals no selection (e.g., “”“ or ““ or ““). If the user leaves the box set to this text, then the search will not consider the values of the current property.
• Value Settings: Enter a default value for the property here. This value will be submitted if the user does not make a selection from the control. Leave this blank to use the empty selection as a default.
Using Property Values Based on Choice Column Values from a SharePoint List
As mentioned above, the Choice Column Values option takes all unique values found in a given column of a given SharePoint list. Use this option for lists that have many items but just a few values for your selected column. For example, if you will reference the “status” column for a list of documents, then use this option because there is probably just a few status values for an otherwise long list of documents.
To use choice column values, do the following:
1. Configure a mapped property as described above under “Searchable Property Configuration Settings”.
2. In the Property Values area, set the Value Source setting to Choice column values. The page reloads to show the relevant settings in the Property Values area.
3. Under the Value Data heading, make the following settings:
Specify the list to get data from: Select either a local SharePoint list from which to get data or select ““ to use a list from another SharePoint installation. If you choose to specify a URL, then the page will reload to include an input form in which to enter the URL; use the URL at which the relevant list is provided by the remote installation, then click on Load to load its columns (which makes column choices available in the next drop-down list).
Specify the column to get data from: Select the column from which to fetch values. (As mentioned above, if you are using a remote list specified by URL, you must enter a URL and click on Load to make column names available here.)
4. Under the Value Selector heading, make the following settings:
Select the value selector…: Choose the type of control you would like to provide: “drop-down box” or “Lookup dialog”. A drop-down box shows all available values, including one for an empty selection. A lookup dialog provides an input field in which the user can begin to type, with matches from the specified list shown based on the characters typed so far. Use a drop-down list when there are relatively few values; use a lookup dialog when there are many values in the list.
Specify … empty selection: This setting is only provided when you have chosen “drop-down box” for the setting above. Enter the text to show for the list-box item that equals no selection (e.g., “”“ or ““ or ““). If the user leaves the box set to this text, then the search will not consider the values of the current property.
5. Under the Value Settings heading, enter a default value for the property. This value will be submitted if the user does not make a selection from the control. Leave this blank to use the empty selection as a default.
Using Property Values Based on List Values from a SharePoint List
As mentioned above, the List Values option takes a value from a given column for each row of a given list. Use this option for lists where each row is likely to have a unique value in a selected column. This option enables you to select separate display and submit columns and also to use a list view to fine-tune the content and sorting of the input options.
To use list values, do the following:
1. Configure a mapped property as described above under “Searchable Property Configuration Settings”.
2. In the Property Values area, set the Value Source setting to List values. The page reloads to show the relevant settings in the Property Values area.
3. Under the Value Data heading, make the following settings:
Specify the list to get data from: Select either a local SharePoint list from which to get data or select ““ to use a list from another SharePoint installation. If you choose to specify a URL, then the page will reload to include an input form in which to enter the URL; use the URL at which the relevant list is provided by the remote installation, then click on Load to load its columns (which makes column choices available in the other drop-down lists).
Specify a list view…: Each SharePoint list can be configured with any number of views, each of which establishes a specific set of filtering and sorting criteria. You might use an existing view or create a special one for the purpose of providing relevant, sorted values optimized for your search form. There will always be at least one view (which is the raw list), but there might be many more. Select the appropriate view name here. See also your SharePoint documentation for complete details about how to work with list views.
Specify the column to get values from: Select the column from which to fetch values that will be submitted to the search engine. These may or may not be the same as the values displayed to the user; for example, the user might select from a list showing department names, but a department ID value will be submitted because this is what is used in the search database.
Specify the column to get display values from: Select the column from which to fetch values that will be shown to the user. This may or may not be the same as the column containing the submit values.
4. Under the Value Selector heading, make the following settings:
Select the value selector…: Choose the type of control you would like to provide: “drop-down box” or “Lookup dialog”. A drop-down box shows all available values, including one for an empty selection. A lookup dialog provides an input field in which the user can begin to type, with matches from the specified list shown based on the characters typed so far. Use a drop-down list when there are relatively few values; use a lookup dialog when there are many values in the list.
Specify … empty selection: This setting is only provided when you have chosen “drop-down box” for the setting above. Enter the text to show for the list-box item that equals no selection (e.g., “”“ or ““ or ““). If the user leaves the box set to this text, then the search will not consider the values of the current property.
5. Under the Value Settings heading, enter a default value for the property. This value will be submitted if the user does not make a selection from the control. Leave this blank to use the empty selection as a default.
Using Property Values Drawn from a Web Service
It is possible to import value options from another system that provides a Web Service for suppling these values. This is an alternative to the SharePoint list and custom-list options described in the sections above.
Search & Preview includes a sample Visual Studio project that provides a skeletal Web Service that will return value options in the format required by Search & Preview. You must customize this project using Visual Studio so that it will interact correctly with your remote system. The project includes comments, examples and other documentation that will help you customize the service; some programming experience is required. Search & Preview submits a property ID to the service and expects to receive a set of values back. To find this project, open your Search & Preview CD or downloaded archive and then look in the following folder:
To configure a searchable property to fetch input-value options from a Web Service, do the following:
1. Customize the skeletal service supplied with Search & Preview as needed for your remote system. Then install and test the service.
2. Establish a searchable property in Search & Preview and configure it as a mapped property (as described above under “Searchable Property Configuration Settings”).
3. Set the Value Source setting to Web service data provider. The page then reloads to show the relevant settings in the Property Values area.
4. In the Value Data field, enter the URL of the Web Service. To confirm that the service is available, click on the Click here to test values link.
5. Under the Value Selector heading, make the following settings:
Select the value selector…: Choose the type of control you would like to provide: “drop-down box” or “Lookup dialog”. A drop-down box shows all available values, including one for an empty selection. A lookup dialog provides an input field in which the user can begin to type, with matches from the specified list shown based on the characters typed so far. Use a drop-down list when there are relatively few values; use a lookup dialog when there are many values in the list.
Specify … empty selection: This setting is only provided when you have chosen “drop-down box” for the setting above. Enter the text to show for the list-box item that equals no selection (e.g., “”“ or ““ or ““). If the user leaves the box set to this text, then the search will not consider the values of the current property.
6. Under the Value Settings heading, enter a default value for the property. This value will be submitted if the user does not make a selection from the control. Leave this blank to use the empty selection as a default.
Setting up Query Properties
As mentioned above, query properties generate a pre-defined query and add it to the user-defined query. You design your query properties using the advanced Search & Preview syntax and can therefore generate any type of query, including queries that include advanced Boolean operations and mapped metadata.
A query property is able to present users with any number of (usually related) query options. For example, it might provide a drop-down list for finding large, medium or small images. Behind the scenes, each of the selections from this list will generate a query that uses the Search & Preview search syntax to search for image files in specific size ranges.
To create a query property:
1. Start as described above to create a new searchable property and be sure to set Property Mode to “Query Property”.
2. Make a suitable selection for the Operator setting. Your (or the user’s) selection here will affect the entire query clause created by your property.
3. Use the settings in the Property Values area to define the various types of queries that will be available for your property. The controls and options provided for doing this are described below.
The Value Data table shows the list of queries that are currently defined for your property (if any).
Use the buttons at the top of the table to work with the list as follows:
|
Click here to add a new query to the table. This opens the Property Value pop-up window, which enables you to define the query (see below). |
|
To edit an existing query in the table, select the target query and then click here. This opens the Property Value pop-up window, which enables you to define the query (see below). |
|
To remove an existing query from the table, select the target query and then click here. |
|
The queries will be displayed in the search form using order indicated by the table. To move an existing query up in the list, select the target query and then click here. |
|
To move an existing query down in the list, select the target query and then click here. |
When you choose to edit or create a new query row, the Property Value pop-up window is displayed to enable you to define the value with a name, submit value, abbreviation, and icon.
Make the following settings in the Property Value window:
• Display Name (required): Enter a description of the query as it should be presented to the user.
• Query (required): Enter the full query using the Search & Preview query syntax. The query can be a simple or as complex as you like.
• Icon URL (optional): If you would like to display a small icon next to the value, then enter the URL for that icon here.
• Abbreviation (optional): If you would like to include the current query in expressions written using the Search & Preview search syntax, then use this setting to establish a short term for the query.
Click on OK when you have finished defining the query.
Once you have finished setting up the query table, make the following settings to control how the queries will be presented to users:
• Value Selector: in the current release, Drop down box is the only option available here; it is selected automatically. A future release may include support for other types of presentations, such as radio buttons, check boxes and/or a lookup dialog.
• Value Settings: this setting is only provided when Value Selector is set to Drop down box. Enter the text to show when no value has been selected from the drop-down, for example: ““ or ““ or ““. If the user leaves the box set to this text, then the search will not consider values of the current property.
Need more help with this?
CONTACT US info@ontolica.com OR use our homepage