|
||
|
Overview Search Form Output Format Template files Head and Tail files Raw Output Link Style Date and Size Highlight Style Search Guidance Search-again Form No-Match File Advanced Integration Search Options Indexing Options Activity Reports Troubleshooting FAQs
|
The search results are output in three parts:
the prolog, the body, and the epilog.
You can customize the prolog and/or epilog by creating a Template file or by creating Head and Tail files.
You can customize the body by setting options in the search URL.
If you need more control over the search results,
visit the Advanced Integration section of this Guide.
Template FilesA Template file contains the HTML that is sent to the browser before and after the search results. Use it to control the appearance of the search results by, for example, setting the font, specifying a background images, and adding navigation aids.The template file is a web page that includes the text
The search engine will replace that text with the search results.
Blossom will read your Template file once a day, so changes you make to the file will be reflected automatically on your results page. The Template file is retreived from your Web server, so it can use server-side features like file includes and scripting. However, the Template is delivered to your site visitors from searchBlossom.com, so server scripting will have run at the time the template was retrieved, not when the visitor does a search. Also, if you include URLs in the Template file, be sure to use absolute references back to your site. Browsers will interpret relative URLs as being located at Blossom. Alternatively, you can add a BASE tag to the HEAD section of the Template file. For example, the following BASE tag allows local URL references to pages on www.mysite.org: <HEAD> <BASE HREF="http://www.mysite.org/"> </HEAD> <BODY> To set your Template file, log on to your Search Configuration page at BlossomSoftware.net and following the login link. Head and Tail FilesAs an alternative to creating a template file on your Web site, you can specify HTML on your Search Configuration page at BlossomSoftware.net. The Head file contains HTML that is sent to the browser just prior to the search results. The HTML in the Tail file is sent just after the search results.At a minimum, the Head file must open the HTML document: <html> <head> </head> <body> The Tail file closes the document: As with a Template file, if you include URLs in Head and Tail files, be sure to use absolute references back to your site or use a BASE tag.</body> </html> Alternate Head and Tail Files. An index can have two sets of Head and Tail files, the default set and the alternate set. Normally, the default set is used, but if you append /alt to the search URL, then the alternate set is used. You can use the alternate set to test out a new format or to provide a different format to visitors using a mobile device. Raw OutputThere may be times when you just want the search results without any head or tail text, for example if you are inserting the search results into a page created dynamically on your Web server. You can remove the head and tail text by appending /raw to the end of the Blossom Search URL.Controlling how links to documents are shownYou can control how the header for each document appears in the search output and what text is hyper-linked to the document using the "link" option. There are three styles:
The default link style is 3, with the whole text block linked, the title strong and the URL shown as a link. To indicate that the whole block is a link, the block is highlighted when the mouse pointer is over any text in the block. Also, when the mouse is left over the block for more than a second, it is expanded to show any hidden page extracts. Change the link style by appending "link" followed by 0, 1 or 2. For example, to make the title a hyper-link and to eliminate the URL, append /link2 to the search URL. (Regardless of the link style, if a document does not have a title then the URL is used in its place.) Limiting the length of URLs. To keep very long URLs from impacting the display of search results in a browser, the search engine limits the length of URLs to 80 characters. If a URL is longer, then characters from the middle of the URL are replaced with "...". You can change the length limit using the "url" option. To set the limit, append url followed by a number to the search URL. For example, appending /url120 would set the length limit to 120 characters. URL Substitution. Normally, the link for a search hit is the URL that the spider visited to find the matching text. You can use a different URL for the link by using the Blossom "URL" comment: For example, suppose the document at http://www.mysite.com/okay.html contains some text that matches a search query. If okay.html contains the comment<!--Blossom:URL="substitution_url"--> then the link in the search results for the text in okay.html will point to better.html.<!--Blossom:URL="http://www.mysite.com/better.html"--> Displaying page size and modification dateYou have the option of displaying in the search results the size and date of the documents matched. The date is that reported by your Web server. Our experience has been that Web servers do not always report dates accurately. The size is the file size seen by a browser, reported in bytes.By default, neither date nor size are shown. Use the "info" option to show one or both. There are four styles:
https://searchBlossom.com/query/ID/info3 Controlling how search matches are highlightedIn the search results, matched words are highlighted. There are four styles of highlight:
The default highlight style is 0, red text. You can change the highlight style by appending the word "style" followed by a style number to the search URL. Use the digits 1-3, shown above. For example, to get bold text with a yellow background, append /style3 to the search URL. Controlling search guidanceDepending on the results of a search query, the search engine may offer guidance for a follow-on query. For example, if a query generates lots of hits, the search engine may suggest super phrases (queries with more terms) to narrow the search. Alternatively, if a query doesn't generate any hits, the search engine may suggest sub-phrases to widen the search. The suggested phrases appear before the actual hits, if there are any.You can control the number of suggestions shown and turn off search guidance altogether using the "phrase" option. By default, up to five suggestions are shown. Appending /phraseN to the search URL limits the number of suggestions to N. Thus the following search URL would limit guidance to a maximum of three phrases. To turn off search guidance, append /phrase0 (or /nophrase) to the search URL.https://searchBlossom.com/query/ID/phrase3 Search-Again FormBy default, the search engine will create and display a search-again form following the search results (just before the tail file). The form consists of a text box containing the current search string along with a "Search Again" button.You can change the location of the form by appending a "form" option to your search URL. There are three choices:
If you don't want the form to appear anywhere, append /noform to your search URL. For example, <form method="get" action="https://searchBlossom.com/query/ID/noform"> . . . Customing the Search-Again Form. If the standard search-again form does not meet your needs, turn off the form generated by the search engine using /noform and put a form of your design in the head or tail file for your index. If you'd like the text box of your search-again form to contain the search terms used in the last search, then follow these steps:
Text Displayed when No Matches are FoundWhen a search term is given that doesn't match any documents on your site, the search engine will offer a search tip, if appropriate. You may want to offer a tip of your own, as well, by creating a "no-match" file. For example, perhaps your site has a specialized search engine for searching a database. You might want to put a link to the specialized search in the no-match file.Like the head and tail files, a no-match file contains HTML that is delivered from searchBlossom.com, so be sure to use either absolute URLs or a BASE tag. Upload your no-match file through your search configuration page at BlossomSoftware.net. |
|
|
|
||