disp = search
This Disp is used to display the search form and search results.
In v6.6+, the search uses a ranking algorithm in order to present the most relevant results on top.
The display is influenced by the settings found in the collection Features > Other displays > Search Results.
This, of course, only applies as long as the particular skin you are using doesn’t completely override the behavior of b2evolution’s default disp=search
handler.
Technical Information
The default _search.disp.php
template calls search_result_block()
to perform the search and display the results.
The results are cached in order to increase speed in case of multipage search navigation.
There is a flush()
before starting the search in order to display the first part of the page before the search process, which can be pretty long.
The search also first tries to find all the objects that match the keywords. It tries to search the following types of objects:
- Posts/Items Note: sidebar links are excluded –
search_and_score_items()
- Comments –
search_and_score_comments()
- Files –
search_and_score_files()
- Categories –
search_and_score_chapters()
- Tags –
search_and_score_tags()
Each matched object is scored with a relevance score.
Then the results are sorted by descending relevance score.
Finally, at display time, the results are displayed with a match-quality percentage.
Default Container and Widgets
By default, this disp does not display a specific widget container. Yours may look different depending on the particular skin in use, the widgets currently installed and how they are configured.
_search.disp.php
file in the currently used skin’s folder.