Jump to main content.


PDF Disclaimer

You will need Adobe Acrobat Reader to view PDF files. See EPA's PDF page for more information about getting and using the free Acrobat Reader.

Site Help

    Topics

    Glossary

    Site Map


Entering Intranet
Many links on the Web Guide are available to EPA Intranet users only. If you are an outside contractor working for EPA, please contact your EPA representative for more information. If you are another federal agency or other party interested in EPA's web policies and procedures, please contact EPA through the "Contact Us" page on this site.

Questions?

Web or WebCMS Questions?

Email the EPA Call Center
1-866-411-4EPA (4372).
EPA Call Center

Computer Questions?

Call CTS
1-866-955-4CTS (4287).
EPA Call Center

Coding Advanced Search Pages

What is advanced search?

Advanced search is an application that offers all of the options of standard search, plus two more:

  1. Searching within specific fields, such as title, keywords or description
  2. Applying Boolean operators
A program or region would typically have a simple search box on all of their HTML pages, but only one or a few advanced search pages. If you have an advanced search page for your area, you should add the areasearchurl parameter to all of your basic search pages, so that the "Advanced Search" link in the search results will point to your advanced search page.

The easiest way to build an advanced search page for your area is to copy the public access or intranet advanced search page:

http://www.epa.gov/epahome/search.html

http://intranet.epa.gov/agcyintr/search.html

and add the filter, fld and areaname parameters for your area (see " Coding the basic search box").

Fields available to advanced search

Field nameNotes
audienceFor future expansion – the intended audience for this page
authorPopulated from author metatag
epa_collection"metaboth" or "all". Metaboth indicates document is in WEBI or iWEBI.
epa_groupPopulated from "group" metatag
epa_titleUntruncated preferred title
homepage1 if designated as homepage in WEBI, otherwise blank or 0
keywordKeywords from metatags + WEBI keywords if found
metacollFor future use
object-typeFull MIME-Type of document
ratingWEBI page rating
searchfirstComposite field used internally
searchsecondComposite field used internally
textwWords anywhere in the document
tssmsAccount code for document
urlPreferred URL

Coding the advanced search form

Advanced search is implemented as a separate servlet in the epasearch webapp. For public access, the action parameter of your form should point to http://nlquery.epa.gov/epasearch/advanced. For intranet, the URL is http://nlintrasearch.epa.gov/epasearch/advanced.

All of the parameters and rules for basic search apply to advanced search with one exception – there is no querytext parameter. Instead, query text is specified using four pairs of parameters. The first of each pair is a text box into which the user types his search terms. The second of each pair is the name of the field to search in. This is typically implemented using a dropdown.

In most cases, you should provide a textbox of each of the four text fields, each paired with a dropdown for selecting the field to search. The default fieldname is textw (fulltext).

Text fieldOperatorFieldname field
anyqueryAny of these termsanyin
allqueryAll of these termsallin
nonequeryNone of these termsnonein
phrasequeryExact phrasephrasein
Sample 1. – Region 13 advanced search on public access.
<form method="get" action=http://nlquery.epa.gov/ epasearch/epasearch>
<input type="hidden" name="typeofsearch" value="area">
<input type="hidden" name="areaname" value="Region 13">
<input type="hidden" name="filter" value="samplefilt.hts">
<input type="hidden" name="fld" value="region13">
<input type="hidden" name="result_template" value="epafiles_defaults.xsl">
Any of these words: <input name="anyquery" value="" size="30" />
<select name="anyin">
  <option value="textw" selected= "selected">anywhere in the document</option>
  <option value="title">in the title< /option>
  <option value="keywords">in the keywords</option>
  <option value="description">in the description</option>
  <option value="url">in the url </option>
</select>
<input type="submit" value="Go">
<input type="reset" value="Reset">
All of these words: <input name="allquery" value="" size="30" />
<select name="allin">
  <option value="textw" selected="selected">anywhere in the document< /option>
  <option value="title">in the title</option>
  <option value="keywords">in the keywords</option>
  <option value="description">in the description</option>
  <option value="url">in the url< /option>
</select>
None of these words: <input name="nonequery" value="" size="30" />
<select name="nonein">
  <option value="textw" selected=" selected">anywhere in the document</option>
  <option value="title">in the title</option>
  <option value="keywords">in the keywords</option>
  <option value="description">in the description</option>
  <option value="url">in the url< /option>
</select>
This exact phrase: <input name="phrasequery" value="" size="30" />
<select name="phrasein">
  <option value="textw" selected="selected">anywhere in the document< /option>
   <option value="title">in the title</option>
   <option value="keywords">in the keywords</option>
   <option value="description"> in the description</option>
   <option value="url">in the url</option>
</select>
Document type:
<input type="checkbox" name="doctype" value="html" checked="checked" />HTML
<input type="checkbox" name="doctype" value="pdf" checked="checked" />PDF
<input type="checkbox" name="doctype" value="plain" checked="checked" />Text
<input type="checkbox" name="doctype" value="msword" checked="checked" />Word
Sort by:
<input type="radio" name="sort" value="term_relevancy" checked="checked" />Relevance
<input type="radio" name="sort" value="date" />Date
</form>

Top of Page




Local Navigation





Jump to main content.




0