Автор Тема: Легкий сниппет поиска для Ево и Рево 2.1  (Прочитано 2334 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн sadex13

  • Разработчик
  • *****
  • Сообщений: 1097
    • Просмотр профиля
  • Версия modx: Evo 1.0.6, ClipperCMS 1.2.6
Описание от автора

This section contains a search snippet for MODx which I wrote because I wanted a lightweight and reliable search snippet. "Bells and whistles" didn't really matter to me as much as being robust.

It also aims to be reasonably intelligent in selecting results. Alot of site searches only return documents that contain all the search terms. This will give preference to such documents, but still show others. To be precise the results are ranked firstly according to whether the exact phrase entered is found, secondly according to how many of the original search terms are found, and thirdly according to the date of the last edit - on the basis that recently edited documents are more likely to be relevant on most sites.

Note that the number of different instances of the same search terms is not counted so, for example, searching for 'gold coin' prefers a document containing the exact phrase "gold coin", secondly a document containing both words separately, and lastly a document that contain numerous instances of "gold" but none of "coin" - as although its count of "gold" words may exceed the combined counts of both terms in other documents, it is far less likely to be relevant.

You set up the search form which sends the data to the search results page where the snippet lives. It is templated - although you may find the defaults quite usable - and you can choose which template variables get searched.

Ссылка на страницу описания и загрузки сниппета:
FluxBB (PHP/MySQL) - легкий и быстрый форум для MODX с открытым кодом, минимальные требования к ресурсам.