Google Search Appliance Creating the Search Experience Manual do Utilizador Página 116

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 141
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 115
Google Search Appliance: Creating the Search Experience Advanced Customization Topics 116
3. For the
src
attribute of the inline frame tag, specify
http://appliance_hostname
, where the host
name is the correct value for your search appliance. This value points to the default front end. If you
want to open a different front end, or customize any other query parameters for the search
interface, add them to the URL as shown in the example code.
4. Optionally, set the frame
width
and
height
attributes to make sure the inline frame is large
enough to accommodate the search results page. Add a
noresize
attribute if you want to prevent
end users from changing the size. You can set any optional attributes of the inline frame (scrolling,
align, and so on.) depending on your design goals for the page.
5. Save the page.
6. Perform a test search from the page verify that the search page and results page are displayed
inside the inline frame as expected.
Creating an HTML Form Search Box
With a simple HTML form such as the one depicted in the “HTML Form Example Page” on page 113, you
can integrate a simple search box directly into your web page instead of using the default search page.
This approach allows an end user to focus on the page content with minimal distraction from the search
interface. However, if the user needs to perform a search, the search box is readily available, as shown
below.
HTML Code for a Form Search Box
The HTML code for the search box used in the example is derived from a
form
tag in the side navigation
of the page.
<form method="GET" target="FlyFrame" action="http://appliance_hostname/search">
<input type="text" name="q" size="32" maxlength="256" value="" />
<input type="submit" name="btnG" value="Search" />
<input type="hidden" name="site" value="default_collection" />
<input type="hidden" name="client" value="example-frontend" />
<input type="hidden" name="output" value="xml_no_dtd" />
<input type="hidden" name="proxystylesheet" value="example-frontend" />
<input type="hidden" name="filter" value="p" />
<input type="hidden" name="getfields" value="*" />
</form>
This form submits a
GET
request to the search engine, requesting results in the format specified by
example-frontend
. The example form includes optional input fields for a submit button and for query
parameters that enhance the visual effect of the page. These parameters turn off duplicate directory
filtering (
filter
), retrieve meta tag values (
getfields
), and specify the stylesheet associated with
example-frontend
(
proxystylesheet
).
The requirements for an HTML for search box are:
Specify the
GET
method and the path
http://appliance_hostname/search
Vista de página 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 140 141

Comentários a estes Manuais

Sem comentários