Search

  • What does it do?

    The jrSearch module adds search functionality to your site.

    The skins get to define how broad or narrow the site search is by the settings they use in the templates.

    Its possible to search everything, or just put a search into a section and search that section only.
  • screenshot of the sitewide search in use by a user searching for something
  • search results being displayed after a sitewide search
  • screenshot of the info tab for the search module in the ACP
  • Development

    If you want to add a search box to a location, there are a couple of functions provided to tap into the Search module system.

    The first function, {jrSearch_form ...} is the site wide search and will be what is wanted for most situations for use in a skin:
    {jrSearch_form class="form_text" value="Search Site" style="width:70%"}
  • The second function is for use by module developers to search just their module. It was created to provide a search box for the modules index.tpl file.

    That function is {jrSearch_module_form ...}
    {jrSearch_module_form module="jrBlog" fields="blog_title,blog_text"}
  • jrSearch_form

    Function
    jrSearch_form
    parameter
    type
    default
    required
    description
    module
    string
    all
    off
    The module within for the search term
    page
    int
    1
    off
    The page of the search results to show
    pagebreak
    int
    4
    off
    How many results to show per page
    value
    string
    search site
    off
    The text to show as a place holder in the search box
    class
    string
    -
    off
    Any classes that should be applied to the search input area
    tpl_dir
    string
    -
    The name of the module directory to use to locate the template="" file if not the current skin
    template
    string
    -
    The name of the custom template to use if not the default.
    method
    string
    post
    POST or GET method for form submission.
    ????
    ?????
    -
    Any other key="value" set you want to add to be passed to the template.
    Site wide search used in the skin templates.
  • jrSearch_module_form

    Function
    jrSearch_module_form
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    The name of the module to search. (un-necessary inside the modules index.tpl file as its already set by $_post['module'])
    fields
    CSV
    all
    on
    The datastore keys to search for the search term. eg: fields="blog_title,blog_text"
    template
    string
    -
    An optional template file to use to customize the layout of the input box. Place file in the active skin to use.
    A search form that targets specific module datastore key to target when searching.
  • Tab: Global Config

    On the Global Config tab of the Search module in the ACP you will find options to configure how the search results are returned.
  • screenshot of the Global Config tab in the ACP
  • An important option to know about is the Additional Search Fields as it allows you to include any extra fields that are stored in the datastore in the search results.

    This is useful if you use the Form Designer to add additional fields to forms which you want to be checked for in search results.

    The info for the Additional Search Fields is this:
    Quote: If you would like to have additional DataStore fields available for search, enter the DataStore field name, one per line.

    Example:
    If you have created a custom User Profiles field via the Form Designer called "profile_location" you would enter profile_location on a line by itself to enable that field to be searched.

    You may also include an optional weight value that will make the search field have more impact on the search results:

    profile_location,10

    Would set the weight for the profile_location field to 10, which means a search match on that field would be 10 times more important than the default value of 1.
  • If the results dont show up, try rebuilding the search index via the tool at:
    ACP -> MODULES -> LISTING -> SEARCH -> TOOLS -> REBUILD INDEX
researchcooperative
29 Aug 2015 06:47:15AM @researchcooperative:
@michael, @brian, @douglas

Do instructions exist for users (not developers) of Jamroom sites that have the search module installed?

Having a standard set of instructions for users and site visitors would be a good starting point for administrators who want to add such instructions to the documentation or FAQ of their site.

i.e. FAQ: "How can I search the content of this site?"

This would:

(1) explain allowed and not-allowed search terms and punctuation, and
(2) which parts of a forum message or page or other content type are searched?

Title, content, and tags? Title only? Content only? Tags not at all?

Apart from the tag clouds, is there any other way for common users/visitors of a JR website to search for the tags of tagged content?

Black-Eagle
11 Oct 2015 10:50:35AM @black-eagle:
Hello

I need a detailed documentation for search module too.

Thank

researchcooperative
11 Oct 2016 07:25:39AM @researchcooperative:
My impression from using the various search fields is that comma separated search terms return results equivalent to the Boolean logic of "OR"

e.g. if we write: dogs, cats in the search field, we will see all results for dogs, and all results for cats.

My dream would be a fully functioning Boolean search system in at least the global search field, as and advanced search option for users, allowing
OR (both terms produce results)
AND (both terms required to produce a result)
NOT (result excluded if second term is present... if I recall correctly)

brian
11 Oct 2016 03:07:14PM @brian:
The Search module supports Boolean searches - you can do:

cats AND dogs
cats OR dogs

Let me know if that helps

Share This

Tags