Saved search

From VYRE

Jump to: navigation, search

Saved searches are an integral part of VYRE Unify, used to dynamicaly create a list of items from selected data and/or file stores.

Contents

Uses of Saved Searches

Saved searches can be used in conjunction with various portlets or with pages to provide access to content that matches the criteria of the Saved Search that is selected.

Portlets that make use of Saved Searches

Some of the portlets that use saved searches include:

Item Detail based on a Saved search

When the mode of a page is set to Display item from a Saved Search they the page will act as an Item display page based on an item returned by the saved search selected.

Creating a Saved Search

Within 'Content' under 'Search' any query can be submitted to search through all or specific data or file stores.

  1. After querying a search, clicking on 'Save this search' shows another screen which is used to edit that query and to save it.
  2. In the next screen fill out a meaningful name within 'Name'.
  3. Within 'Description' write out the textual description of the search query.
  4. Select a folder from the Dropdown box, under which the Saved Search will be saved. If “None” is selected, Saved search will get saved directly under the Content > Saved searches. The folders appearing in the dropdown box can be pre-created by going to Saved searches branch in Content Module
    • Select the Create Folder button
    • Give a meaningful name and description for folder name and description
    • Save the folder. (These folder properties can be edited anytime, but to delete a folder it should be empty. )
  5. 'Query' should already have the syntax that has been used to search for specific items. Other the default query is "+active:true", which shows all active items within a single/multiple stores.
  6. 'Search only active items' is the default selection and as it states the query will search for active items, and vice versa 'Search only checked out items' will query all inactive/checked out items.
  7. Available stores/Selected stores gives the option of choosing which stores to search through. Use the ">>" or "ALL >>" to select the stores from the "Available stores", the choosen stores will be displayed under "Selected stores".
  8. 'Type' 'Field name' 'Value' 'Add' should be used for basic searches; this type of search is optimised for performance.
    1. The top field named 'Query' should not be used for the same variables whilst using this type of search, though the two can be combined.
    2. 'Type' has a drop down presenting two values '+' and '-', the "+" or required operator requires that the term after the "+" symbol exist somewhere in a the field of a single document. The "-" or prohibit operator excludes documents that contain the term after the "-" symbol.
    3. 'Field name' is the query term and 'Value' is the term value. For example '+active:true' will translate to:
Type Field name Value
+ active true

8. Click on 'Add' and then 'Save'.

Testing a Saved Search

Details to follow...

Saved search and render attributes

Since Unify build 4.4.0.2, the user can add render attributes to a saved search. Eg.

+active:true +categoryIds:$render_siteCategoryId

The variable $render_siteCategoryId is picked up by the saved search from the page where it is defined.

Fig.1 Render attribute

In the example depicted in Fig.1, the render attribute siteCategoryId is defined and given a value of 8. The value will be picked up in the saved search.

Using URL parameters in a Saved Search

Since Unify build 4.4.0.2, the user can include URL parameters in a saved search. Eg. It is possible to use URL string parameters in a saved search using the $request_{PARAMETER}

For instance to a URL might be:

http://cms.site.vyrehosting.com/sign-up-feed/?creationDateStart=20100101&creationDateEnd=20100501

To access these parameters in your saved search you could use something like:

+(+creationDate:[$request_creationDateStart TO $request_creationDateEnd])

See also

Personal tools