4.11. Search Reference

The supplied simple/srchform.html and simple/results.html pages show example search forms. Modify them to present the search in any way desired. Be careful to use the proper variable names for passing to Interchange. It is also necessary to copy the hidden variables as-is. They are required to interpret the request as a search.


Note: The following definitions frequently refer to field name and column and column number. All are the references to the columns of a searched text file as separated by delimiter characters.

The field names can be specified in several ways.

ProductFiles

Other database files

Other files

Fields can also always be specified by an integer column number, with 0 as the first column.

mv_all_chars

mv_base_directory

            [set /directory/name]1[/set]

mv_begin_string

mv_case

mv_coordinate

mv_dict_end

mv_dict_fold


Note: This is the reverse sense from mv_case.

mv_dict_limit


Note: The order of this and the mv_dict_end variable is significant. Each will overwrite the other.

            <INPUT TYPE=hidden NAME=mv_dict_limit  VALUE=category>
            <INPUT TYPE=hidden NAME=mv_search_file VALUE="products.txt">
            <INPUT TYPE=hidden NAME=mv_dict_limit    VALUE="-1">
            <INPUT TYPE=hidden NAME=mv_search_file   VALUE="products.txt.category">
            <INPUT TYPE=hidden NAME=mv_return_fields VALUE="1">
            Search for
            <SELECT NAME=mv_dict_limit>
            <OPTION> author
            <OPTION> title
            </SELECT> beginning with <INPUT NAME=mv_dictlook>

mv_dict_look

mv_dict_order

mv_doit

mv_exact_match

mv_field_names


Note: Use this on the product database only if planning on both pre-sorting with mv_sort_field and then post-sorting with [sort]field:opt[/sort].

mv_first_match

mv_head_skip

mv_index_delim

mv_matchlimit

mv_max_matches

mv_min_string

mv_negate

mv_orsearch

mv_profile

mv_range_alpha

mv_range_look

mv_range_max

mv_range_min

mv_record_delim

mv_return_fields

As with SQL queries, you can use the '*' shortcut to return all fields. For example:

    [loop search="fi=nation/ra=yes/rf=*"]

when used with a hypothetical 'nation' table would be equivalent to:

    [loop search="
          fi=nation
          ra=yes
          rf=code,sorder,region,name,tax
    "]

as well as:

    [loop search="fi=nation/ra=yes/rf=0,1,2,3,4"]

and:

    [query sql="select * from nation"][/query]

However, you probably rarely need to use every single field in a row. For maximum maintainability and execution speed the best practice is to list by name only the fields you want returned.

mv_return_spec

mv_search_field

mv_search_file

mv_search_match_count

mv_search_over_msg

mv_search_page

mv_searchspec

mv_searchtype

mv_sort_field


Note: If specifying a sort for the product database, mv_field_names must be specified if doing a fieldname-addressed post-sort.

mv_sort_option

mv_spelling_errors

mv_substring_match

mv_unique

mv_value