Difference between revisions of "Pawtucket2:Advanced Search"

From CollectiveAccess Documentation
Jump to: navigation, search
(Created page with "Pawtucket's advanced search system provides a framework for creating custom field-level search forms without programming. All that is needed is some basic configuration and a ...")
 
(Configuration)
Line 12: Line 12:
 
All advanced search forms must have an entry in the ''advancedSearchTypes'' section of your theme's <code>app.conf</code> file. A typical configuration for a pair of type-specific object advanced search forms might look like this:
 
All advanced search forms must have an entry in the ''advancedSearchTypes'' section of your theme's <code>app.conf</code> file. A typical configuration for a pair of type-specific object advanced search forms might look like this:
  
<code>
+
<code><pre>
 
advancedSearchTypes = {
 
advancedSearchTypes = {
 
artworks = {
 
artworks = {
Line 41: Line 41:
 
}
 
}
 
}
 
}
 +
</pre>
 
</code>
 
</code>

Revision as of 19:29, 22 July 2014

Pawtucket's advanced search system provides a framework for creating custom field-level search forms without programming. All that is needed is some basic configuration and a search form view laying out the required fields. The forms can search any field that is indexed and support the following features:

  1. Boolean combination of search terms, including AND, OR and NOT
  2. Repeatable fields
  3. Full text search
  4. Single "field list" elements that may search any of a list of fields
  5. Customizable element width, height and default values
  6. Session-based last-search memory

Configuration

All advanced search forms must have an entry in the advancedSearchTypes section of your theme's app.conf file. A typical configuration for a pair of type-specific object advanced search forms might look like this:

advancedSearchTypes = {
	artworks = {
		displayName = _(Art),
		table = ca_objects,
		restrictToTypes = [artwork],
		view = Search/ca_objects_advanced_search_artworks_html.php,
		itemsPerPage = 10,
		
		sortBy = {
			Relevance = _natural,
			Identifier = ca_objects.idno,
			Name = ca_object_labels.name
		}
	},
	library = {
		displayName = _(Library),
		table = ca_objects,
		restrictToTypes = [book],
		view = Search/ca_objects_advanced_search_library_html.php,
		itemsPerPage = 10,
		
		sortBy = {
			Relevance = _natural,
			Identifier = ca_objects.idno,
			Name = ca_object_labels.name
		}
	}
}

Namespaces

Variants
Actions
Navigation
Tools
User
Personal tools