Overview
 Search Form
 Output Format 
 Advanced Integration 
 Search Options 
   Whole Word Match 
   Phrase Match
   Anywhere Match
   Sort by Date
   Filter by Type
   Result Limits
   Duplicate Pages
   Working with Frames
   Multiple Indexes 
   Categories
   Best Bets
   Non-English Results 
   Lexicon
   Synonyms
 
 Indexing options 
 Activity Reports 
 Troubleshooting 
 FAQs

 
  Search Options are specified in the search form. They can be given as part of the "ACTION" URL or as a hidden field from within the form.

Whole-word matching

By default, the search engine will treat each word entered as a prefix (sometimes this is called wildcard matching). That is, the string "bread" will match not only "bread", but also "breaded", "breading", and "breadth". To force whole-word matching, where "bread" only matches "bread", append /whole to the end of the Blossom Search URL:
<form method="get"
	action="https://searchBlossom.com/query/id/whole"
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="search"><br>
</form>
Alternatively, you can put whole into a form option. For example, you might want to add a checkbox to control whether the search is just for whole words:
Enter word or phrase to search for:  
Only match whole words
<form method="get" action="https://searchBlossom.com/query/id">
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="search"><br>
	<input type="checkbox" name="option" value="whole">
	Only match whole words
</form>

Exact phrase search

The search engine supports three strength-levels of phrase matching:
  • exact. All terms must be next to one another.
  • near. All terms must be near one another, typically in the same sentence or paragraph. This is the default phrase search behavior.
  • relaxed. All terms must be present on a page, but not necessarily near one another.

When a phrase search yields no matches, the search engine offers to search again at the next weaker level. For example, when a near search comes up empty, the search engine offers to search again using a "relaxed" search.

You can trigger a specific level of phrase strength using the "exact" and "relax" options. The "exact" option can be given either by appending /exact to the search URL or by adding a form input tag named option with the value exact. Exact searching is also triggered when the search term is input surrounded by double quotes.

Using "exact" with the "whole" option described above, forces exact phrase matches. Without the "whole" option, an exact search will find variations on a phrase. For example, when searching with "exact" by itself, the phrase "Mount Everest" will match "Mountian Everest" and "Everest Mountain". When combined with "whole", both those matches will fail.

Relax the proximity constraint

By default, the search engine carries out proximity searches. That is, in order for a page to be matched, all of the search terms must appear within 32 words of one another. To find pages that contain all the search terms no matter where they appear, use the "relax" option. Like "exact", "relax" can be appended to the search URL:
	https://searchBlossom.com/query/ID/relax
or given as a form option:
Enter word or phrase to search for:  
Match phrases even if the words don't appear together
<form method="get" action="https://searchBlossom.com/query/id">
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="search"><br>
	<input type="checkbox" name="option" value="relax">
	Match phrases even if the words don't appear together
</form>

One caveat about using relax. When the proximity constraint is removed, the quality of the page matches can decline considerably, particularly if the search phrase consists of common words. We recommend first trying the default behavior, as this limits output to highly relevant matches when appropriate.

Sort results by date

You have the results list sorted by the age of the documents by using the "age" option. A document's age is based on the date reported by your Web server, usually the time the file was last modified. To sort just by date, most recent first, append the /age to the search command:
https://searchBlossom.com/query/ID/age

It can also be given as an option. Here is a simple form that gives your visitors a sort-by-date option:

Enter word or phrase to search for:  
Sort results by date
<form method="get"
	action="https://searchBlossom.com/query/ID">
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="Search"><BR>
	<input type="checkbox" name="option" value="age">
		Sort results by date
</form>

To change the importance of age without eliminating relavance altogether, follow "age" with a digit, 0 to 9. "age0" eliminates age altogether from scoring. "age5" is the default setting. "age1" through "age4" reduce the importance of age; "age6" through "age9" increase the importance.

Filtering Results by File Type

By default, the search output lists how many results there are of each file type and provides links for showing results of a specific type. The "type" option lets you control which file type is shown. If you want to show results of a particular type, append /typeN to the search URL, where N is one of
  1. HTML files
  2. PDF files
  3. Other types of files
For example, the following search URL limits results to HTML files:
<form method="get" action="https://searchBlossom.com/query/ID/type1">

To disable file type filtering, add the option /notype to the search URL.

Limiting the number of search hits shown

A key feature of the search results from Blossom Search is that along with the page title and description for each matching page, is a list showing the actual text that matches. Normally, up to 100 pages, with up to two context hits per page, are shown in the result list. If the query terms appear more than twice on a page, then a "more" link will appear. Clicking on the link will show more context hits, up to a maximum of eight.

You can control the number of pages shown at a time in the result list by adding a limitN option to the query URL. Replace N with the number of pages to output, for example /limit20 would limit the result list to 20 pages at a time.

You can control the maximum number of context hits shown per result page by adding a hit-limit option to the search URL:

  • standard, shows two context hits.
  • compact, no context hits are shown, just the page title.
  • compactN, limits the number of context hits to N.
  • unlimited, eliminates any limits either on context hits or page count.

Any of the limit specifications can be put into a form option. For example, you could add radio buttons allowing your users to control the output themselves:

Enter word or phrase to search for:
standard compact unlimited
<form method="get" action="https://searchBlossom.com/query/id">
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="search"><br>
	<input type="radio" name="option"
		value="standard" checked>standard
	<input type="radio" name="option"
		value="compact">compact
	<input type="radio" name="option"
		value="unlimited">unlimited
	
</form>

Duplicate Pages

The search engine treats pages as duplicates if they have the same hit score and the same page title. Normally, duplicate pages will not be displayed. (If the search engine has removed some results, it will offer to search again without removing the duplicates.)

The default duplicate removal strategy may not work well on your site if there are many pages with the same title. You can make duplicate detection stricter by adding /keepdups to the end of the search URL. When "keepdups" is used, only pages that are essentially identical will be treated as duplicates.

Working With Frames

Normally, search output will appear in the same window and frame as the search form. You can direct the output to a new window or a different frame by using the TARGET attribute in the FORM tag. The value of TARGET specifies where the output will be put. Use either the name of a frame you've created or one of these predefined names:
  • _blank puts the search results in a new window.
  • _parent puts the results in the window containing the current frameset.
For example, the following search form puts the search results in a new window:
<form method="get"
	target="_blank"
	action="https://searchBlossom.com/query/ID">
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="Search"><br>
</form>

You can also redirect pages selected in the search results. For example, you might want the search results to appear in the current frame, but when your visitors select an entry in the results, you want the new page to appear in a new window. If you add a hidden target field to the search form, then the search server will add a TARGET attribute to each link in the search results:

<form method="get" action="https://searchBlossom.com/query/ID">
	Enter word or phrase to search for:
	<input type="text" name="key">
	<input type="submit" value="Search"><br>
	<input type="hidden" name="target" value="_blank">
</form>

Searching multiple indexes

If you have multiple indexes, you can search more than one at the same time by appending multiple IDs to the search URL. For example, to search indexes with the IDs 1001 and 1002, use the URL
https://searchBlossom.com/query/1001/1002
As with other options, you can place the index IDs into a form option. For example, here is a form that allows the user to search up to three different indexes:
Enter word or phrase to search for:  
Select categories to search:
  meeting minutes
  municipal code
  calendar
<form method="get" action="https://searchBlossom.com/query/">
Enter word or phrase to search for:
	<input type="text" name="key">
	<br>Select categories to search:
	<br>  <input type="checkbox" name="id"
		value="1000" checked>meeting minutes
	<br>  <input type="checkbox" name="id"
		value="1001">municipal code
	<br>  <input type="checkbox" name="id"
		value="1002">calendar
</form>
Notice that the "Meeting minutes" checkbox in the code above has the CHECKED attribute. At least one checkbox should be checked by default, otherwise if a visitor just types in a search string without checking a box they will get the error message "Please select at least one search category".

Search Categories

To organize search results by categories follow these steps:
  1. Define a set of categories and assign them numbers beginning at one.
  2. Assign documents to categories. Unassigned documents are placed in category zero, the default category.
  3. Add a "category search" option to the search command.

Defining a Category
Categories are defined putting Blossom "Category" comments in your HTML files:

<!--Blossom:Category="#,Name"-->
In place of "#" put the category number. You can define up to 100 categories, numbered from 1 to 100. In place of "Name", put the category name. Category names are displayed in the search output. Documents that do not fall into any category are assigned to category zero. The default "Name" for category zero is "Other", but you can change the name of the by using 0 for "#".

As an alternative to putting comments in every file, you can associate one or more URL prefixes with a category. The prefix is used to categorize documents based on their URL, as described in the next secton. Precede the URL prefix with "@". For example, the following comment associates "BlossomSoftware.net/press" with category 2:

<!--Blossom:Category="2,@BlossomSoftware.net/press"-->

For compactness, the category name and URL can be combined in a single definition:

<!--Blossom:Category="2,Press Releases@BlossomSoftware.net/press"-->

Assigning Documents to Categories
Documents are assigned to categories either explicitly or implicitly. Placing a Category comment in an HTML file explicitly assigns that document to a category. For example, the comment:

<!--Blossom:Category=2-->
assigns the current document to category 2.

You can both explicitly assign a document to a category and define the category in the same comment. Thus

<!--Blossom:Category="2,Archive"-->
assigns the current document to category 2 and defines category 2 to be "Archive".

Documents are implicitly assigned to categories based on their URL. If a document's URL matches the URL prefix for a category (as described in the previous section), and the document has not been explicitly assigned to a category, then the document is placed in matched category. Categories are matched in numeric order, so put longer prefixes before shorter ones.

You may find it convenient to put all category definitions in a single file. If there is more than one Category comment in a file, then the last comment is taken to be the explicit category for the document. For example

<!--Blossom:Category="1,News and Press Releases"-->
<!--Blossom:Category="2,Archive@BlossomSoftware.net/archive"-->
<!--Blossom:Category="3,White Papers"-->
<!--Blossom:Category="0,Other Documents"-->
creates three categories and renames the default category. It also assigns the current document to the default "Other Documents" category.

Triggering a Category Search
A search index that contains categories can be searched with or without having the results divided into categories. To run a search sorted by category, add /cat to the search URL:

<form method="get" action="https://searchBlossom.com/query/ID/cat">

In a category-sorted search the results are ordered by category number, except for category zero which will be at the end. The category name is output before the results in each category using a bold font that is slightly larger than the surrounding text. If you use the "style sheet" option, you can control the appearance of the category headers by giving a style for the Blossom_CatTitle class.

Results can also be filtered by category by appending a category number to /cat, for example:

<form method="get" action="https://searchBlossom.com/query/ID/cat2">
just shows hits in category 2. In addition, all categories with hits are listed at the top of the results along with how many hits appear in the category. /cat0 shows just hits in the default category. /cat101 shows hits in all categories.

Best Bets

The search results are generated by looking for matches between the words in the query with the words in each document. Although you can use titles, descriptions, and meta-tag keywords to influence which query words will rank a document highly, without using Best Bets you cannot guarantee that a document will be listed at the top of the search results.

Best Bets are specified from the Search Configuration page for your index. [Note. Currently, the Best Bets feature is only available with Enterprise and Affinity Search.]

Specifying Best Bets
Begin by accessing your Search Configuration page at Blossom and following the link "Best Bets" under "Search Index Settings".

On the Best Bets page you'll see fields for:

  • Title. This the text displayed before the Best Bet is shown. It defaults to "Best Bets".
  • List of Terms. Each Best Bet has a list of terms to match against a query, and a URL and Description to display if the terms match. The listbox shows all of the Best Bets. Highlight a Best Bet to edit it, or press the "Add" button to create a new Best Bet.
  • Terms A Best Bet is matched when all of the terms for the Best Bet match a query. You can use the wildcard characters "?" and "*" to match query words. "?" matches a single character and "*" matches zero or more characters. Here are some examples:
    "house" just matches the query word "house"
    "house?" just matches query words like "houses"
    "house*" matches query words "house", "houses", "housed" (but not "housing").
  • URL and Description When a Best Bet matches a query, the URL and Description are displayed in the Best Bets section of the search results. The URL is an active link; it can point to any page, even pages that are not in the search index. The description appears underneath the URL. If you want fine control over the appearance of Best Bets, try using cascading style sheets.

Non-English search results.

The search engine can search and display results in most European languages. Text from the index with accents and other marks appears just as it does on the website. By contrast, text from the search engine, such as the search summary and suggestions, is shown in English by default. You can change the language used by the search engine using the "langN" option, where N can be 0 for English or 1 for Spanish.

The "lang" option can be specified by appending /langN to the ACTION URL or by adding it as a form option.

Searching the lexicon

The list of the words in an index is sometimes called its lexicon. By searching the lexicon, your visitors can find words whose spelling they may be unsure of. This is particularly useful for technical terms and names. To search the lexicon for your site, append /lexicon to the search URL. For example, searching the lexicon for "bread" might return "bread", "breaded", "breading", and "breadth" as the result. Here is a simple form for searching the lexicon:
Not sure of how a word is spelled?
Enter the first few letters of the word:
<form method="get"
	action="https://searchBlossom.com/query/id/lexicon">
	Not sure of how a word is spelled?<br>
	Enter the first few letters of the word:
	<input type="text" name="key" size="5" maxlength="5">
	<input type="submit" value="look up">
</form>

Synonyms

By defining synonyms, you enable the search engine's related searches function. When a query contains a word or phrase that is part of a synonym, the search engine displays a list of related searches after the search results. For example, suppose "GIS" and "information technology" have been defined as synonyms. Then a search for "GIS department" would generate
Related searches: information technology department

Synonyms are created from the search configuration page at BlossomSoftware.net. (After logging in, follow the link "Synonyms" under "Search Index Settings".) To add a synonym, give a word and its synonym. Either the word or synonym can be a phrase, but it is best to keep phrases short. In order for the word or synonym to match a query, it must match exactly (except for letter case, which is ignored). That is, the synonym "GIS department" won't match a query of "GIS" by itself.