Skip to content
Byrne Reese edited this page May 13, 2011 · 1 revision

Melody Search Parameters

Melody's search system, which is invoked via either an HTML form, or via javascript to facilitate pagination supports a number of run time parameters. In english that means you can pass a number of HTML form parameters into the query to control and customize the output from Melody's search engine. The following documents these parameters, and their acceptable values.

Search Parameters

  • archive_type -

  • author - Restricts search results to a specific author. The value must be an integer corresponding to the ID of the author you want to restrict the search to.

  • blog_id - The ID of the blog to search. If this parameter is used in conjunction with IncludeBlogs, whereby multiple blogs will be searched, then this parameter can be used to designate the blog whose "Search Results" template will be used for displaying search results to the user.

  • category - Restricts search results to a specific category. The value must be an integer corresponding to the ID of the category you want to restrict the search to.

  • day - Used in conjunction with month and year.

  • ExcludeBlogs - A comma delimited list of blogs to explicity exclude from your search.

  • format - The format to return results in. When left blank, results will be returned using the associated template. Otherwise you may either specify 'feed' to return results in XML, or 'js' to return results in JSON format.

  • IncludeBlogs - A comma delimited list of blogs to search.

  • limit - The number of results to return in a single request. Default is 10.

  • month - Used in conjunction with day and year.

  • page - Used in paginating over search results, this parameter designated what page from the search results to return.

  • SearchMaxResults - ???.

  • SearchResultsDisplay - Show results in ascending or descending order. Default value is 'ascend'. Results can be presented in descending order by specifying a value of 'descend'.

  • SearchSortBy - Sort results by a specific column on the entry table. Supported values are: author_id, title, excerpt, text, text_more, convert_breaks, keywords, basename, week_number, comment_count, ping_count. Granted not all of these are likely to be used, but we will leave that to you.

  • SearchTerms or search - The keywords to search for.

  • Template - The file name of a template in the systems search template path to be used when rendering search results. This is not commonly used anymore, in favor of either the template_id parameter, or more commonly the 'Search Results' system template installed by many themes.

  • template_id (must also pass in archive_type) - Specifies the ID of the template to render the search results. When specifying the template_id for displaying results, the template ID must not refer to a Global Template. If referring to an index template, it must not have an outfile file extension of php or asp. If referring to a non-Index template, then the template's identifier must equal to 'entry_listing'.

  • Type - Restrict your search to pages or entries or include all of them. Values are: 'entry' (default), 'page' and '*' (for both pages and entries).

  • year - Used in conjunction with day and year.

Clone this wiki locally