Super Search Results

The heart of the Super Search module is the Results method.

{exp:super_search:results} content {/exp:super_search:results}

Parameters

Most of the parameters available in the Weblog:Entries loop are available here. However, if you use Super Search in performance mode, the following parameters are relevant.

Note: You can turn off performance mode by supplying this parameter:

performance="off"

author=

author="jake"

The 'author' parameter allows you to fetch entries by a given author. The username is tested unless overridden by the 'author_indicator' parameter. Standard Super Search syntax can be used.

author_indicator=

author_indicator="screen_name"

The 'author_indicator' parameter allows you to override default Super Search before that occurs when searching using the 'author' parameter. Super Search fetches by username unless you indicate 'screen_name' in this parameter.

category=

category="Teeth"

The 'category' parameter allows you to force a category query into Super Search's fetch routine. The contents of this parameter follow the same syntax as regular Super Search queries in the URL or through POST variables. For example, category="Teeth" would fetch entries that belonged to the category of 'Teeth'.

The category="Teeth+Gums" would fetch entries that belonged either to the 'Teeth' category and the 'Gums' category.

The category="Teeth&&Gums" query would fetch entries that belonged both to the 'Teeth' category and the 'Gums' category inclusively.

The category="-Teeth" would fetch entries that do not belong to the 'Teeth' category.

The category="-Teeth+-Gums" would fetch entries that do not belong to the 'Teeth' category or the 'Gums' category.

category_indicator=

category_indicator="category_url_title"

The 'category_indicator' parameter allows you to tell Super Search how you will be providing categories in your search strings. The default behavior is to accept category names, but you can have a more reliable website by providing categories by category url. Naturally, if you use category url it will be more difficult for users to perform their own searches by altering your URI's. But you can still generate searches on the fly using Javascript in your pages or providing special links.

channel=

channel="products"

The 'channel' parameter allows you to force a channel query into Super Search's fetch routine. Channel is synonymous with weblog in Super Search. Fetch entries from multiple channels by listing them using the standard Super Search separator (+). Negate a channel by preceeding it with a dash (-). For example, channel="products" would fetch entries belonging to the 'products' weblog/ channel. While channel="-products+-locations" would fetch entries that belonged neither to the 'products' nor to the 'locations' weblogs/channels.

group=

group="Members"

The 'group' parameter allows you to fetch entries by a given member group. Standard Super Search syntax can be used.

keyword=

keyword="Pants"

The 'keyword' parameter allows you to force a keyword query into Super Search's fetch routine. Use standard Super Search syntax here.

num=

num="50"

The 'num' parameter allows you to override the 'num' parameter that would otherwise be sent through a Super Search string. It controls how many entries are parsed into your page. We use the string 'num' instead of 'limit' in order to align Super Search more closely with Google search syntax.

order=

order="date+desc+title+asc"

The 'order' parameter allows you to override the 'order' parameter that would otherwise be sent through a Super Search string. This parameter controls the order in which entries are retrieved by Super Search. Use Super Search syntax to provide multiple ordering and sorting values. Indicate a field by which to sort and follow it by the direction (asc or desc). Separate the strings using the standard Super Search separator (+).

paginate=

paginate="both"

The 'paginate' parameter allows you to turn pagination on or off as well as to control where the pagination links will appear on your page. The choices are 'top', 'bottom', or 'both'. Use this parameter in conjunction with the 'pagination' variable pair explained below.

performance=

performance="off"

The 'performance' parameter allows you to turn Super Search performance mode 'on' or 'off'. The default setting is 'on'. When in performance mode, Super Search does a much more simple variable parsing routine. Single variables, date variables, some author data and conditionals are available, but categories, related entries and extensive member data are not.

query=

query="keyword+green&channel+products&category+pants+shirts&status+-closed&order+title+asc&start+0&num+100"

The 'query' parameter allows you to hard code Super Search queries right into the exp:super_search_results tag. This method will override any Super Search query through POST as well as any query through the URI. Use standard Super Search syntax here.

The example above will fetch 100 entries whose title or searchable custom fields contain the word 'green', starting at the first entry from the weblog whose short name is 'products'. It will further filter and fetch entries that belong to either the 'pants' or 'shirts' categories. Entries belonging to any status but 'closed' will be retrieved. The results will be ordered by title in ascending order.

relevance=

relevance="title+1+summary+2+body+1"

The 'relevance' parameter tells Super Search to rank fetched entries in order of their relevance. The relevance algorithm is fairly simple in that it merely counts the frequency your keywords appear in the fields you indicate in the parameter. An entry where your keywords occur more frequently ranks higher than entries with lesser keyword frequency.

Because relevance ranking is slower than normal searching, it is turned off in Super Search by default. Turn it on by providing fields and weights as the value of the parameter. You can indicate title and custom fields for relevance searching.

You can provide a numeric weight to each field by simply following the field name with that number. In the above example, entries will be ranked by relevance where the title, summary and body fields are considered. The summary field is weighted twice as important as the other two fields. Keywords appearing in the summary field will count double toward ranking.

Note: Relevance weighted results are much more reliable using performance mode. This is because performance mode is capable of querying the database for much higher result sets than is possible in regular mode. If users search for keywords that will be very common in your results, the variance in accuracy of relevance weighted listings will be obvious. For more refined queries, those that do not invoke pagination for example, relevance weighting will be equally accurate between performance and regular mode. This is a performance tool. We recommend you use it in performance mode all of the time and sacrifice access to member data, categories and related entries.

show_expired=

show_expired="yes"

The 'show_expired' parameter allows you to override the default behavior of not fetching entries that have expired.

show_future_entries=

show_future_entries="yes"

The 'show_future_entries' parameter allows you to override the default behavior of not fetching entries dated into the future.

site_id=

site_id="2|3"

The 'site_id' parameter allows you to display which site(s) to show entries from.

start=

start="500"

The 'start' parameter allows you to override the 'start' parameter that would otherwise be sent through a Super Search string. This parameter controls the starting point for a given subset of entries to be returned. It is most commonly used with pagination.

status=

status="-closed"

The 'status' parameter allows you to override the 'status' parameter that would otherwise be sent through a Super Search string. Use standard Super Search syntax in this parameter to indicate whether to fetch entries belonging to a given set of statuses or excluded from a given set of statuses.

sticky=

sticky="off"

By default, Super Search respects the 'sticky' flag that you can attach to your entries. This parameter allows you to override that default behavior. Providing a value of 'off' will cause Super Search to ignore stickies when ordering entries.