Jump to main content Jump to doc navigation

What is AdvSearch?

AdvSearch is an advanced search component for MODX Revolution. It allows search in dynamic contents (by using Zend Lucene search class), setting up of faceted search and searching in custom packages. It doesn't support the ajax functionality for the moment.

Requirements

  • MODX Revolution 2.0.8 or later
  • PHP5 or later
  • UTF-8 charset
  • php multi-bytes setting ON
  • Zend Search class from Zend library (See installation chapter)
  • Jquery 1.5.1 (provided with AdvSearch)

History

AdvSearch was written by Coroico and first released on August 14th, 2011. It is loosely based on AjaxSearch for MODX Evolution by KyleJ/Coroico, minus dynamic content search based on Zend search library.

Download

It can be downloaded from within the MODX Revolution manager via Package Management, or from the MODX Extras Repository, here: https://modx.com/extras/package/advsearch

Before to run the first search with AdvSearch, you need to install the Zend Search library first. See installation chapter below.

Development and Bug Reporting

AdvSearch is stored and developed in GitHub, and can be found here:http://github.com/coroico/AdvSearch

Bugs can be filed here: http://github.com/coroico/AdvSearch/issues

Installation of the Zend Search class

Even if AdvSearch addon is fully installable through the package management, the first time you install AdvSearch you need to install the Zend Search class. This installation is done only one time and will be valid for all the following re-installation of the addon.

  • go to the Zend Framework download page at http://framework.zend.com/download/latest/
  • register you and download the free Zend Framework. Minimal release is enough.
  • if you haven’t a folder for libraries under assets/ create a folder libraries/ under assets/
  • unzip you Zend package under the assets/libraries/ folder. This should create a subdirectory named "Zend" (assets/libraries/Zend)
  • in this directory only the "search" directory and the "Exception.php" files are required. You could remove all the others files and directories.
  • at the end you should have only the "Search" folder and the "Exception.php" file.

Usage

AdvSearch has mainly 2 snippets - one to display a form ("AdvSearchForm") and the other to display search results ("AdvSearch"). A third snippet ("AdvSearchHelp") is used to display a help window for the presentation of the query syntax.

All the templates used by default to set up the form and display the results are provided as chunks. These chunks are installed through the package management.

Examples

Display a search form, and below it, the results:

[[!AdvSearchForm]]

<h2>Results</h2>
[[!AdvSearch]]

Display a Search form that sends you to a results page in Resource 82 (which has the AdvSearch call in it):

[[!AdvSearchForm? &landing=`82`]]

See Also

  1. AdvSearch.AdvSearch
    1. AdvSearch.AdvSearch.containerTpl
    2. Advsearch.AdvSearch.extractTpl
    3. AdvSearch.Advsearch.paging1Tpl
    4. AdvSearch.AdvSearch.paging0Tpl
    5. AdvSearch.AdvSearch.tpl
  2. AdvSearch.AdvSearchForm
    1. Advsearch.AdvSearchForm.tpl
  3. AdvSearch.AdvSearchHelp
    1. AdvSearch.AdvSearchHelp.helplinkTpl

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • eydolan
  • Lefthandmedia
  • Murray Wood
  • Following Sea
  • Anton Tarasov
  • Stéphane Jäggi
  • Raffy
  • Snow Creative
  • A. Moreno
  • Nick Clark
  • JT Skaggs
  • Helen
  • YJ
  • krisznet
  • Richard
  • Yanni

Budget

$306 per month—let's make that $500!

Learn more