Performing Field-based Searches

Status: works for me...
Last modified: 3/30/04

NOTE: The input fields defined here are not related the output fields for customized output variable substitution. Those are more flexible and can use any regular expression matching.

Required versions: Webglimpse 1.7.5 or above, and Glimpse 4.12.6 or above.

Summary: Field-based searching will allow you to make a query such as

when you have defined "subject" as a field, and you have indexed a file containing the line.
subject: Things

Example: Search for "subject=Things" at the page
*** You must check the box for Use Filters. Note, you can also do combination searches, such as

subject=Things;New Test
This will search for all files containing the text "New Test" and the line "subject: Things". The allowed # of spelling errors and partial match criteria apply only to the field value "Things", not to the field name.

Directions to Use:

  1. Make sure you have installed updated versions of both Webglimpse and Glimpse. For versions of glimpse 4.14 or above, build as follows
    ./configure --enable-structured-queries make clean make make install

    If upgrading from a version prior to 1.7.5, for 1.X run confarc to configure (or re-configure) an archive. This should copy over the new distribution files, including .wginputfields. For 2.X press the 'Save Changes' button in the manage archive screen.

  2. Edit the .wginputfields file in your archive directory. Enter one field name per line, no spaces.

  3. Check that the files you are indexing contain the field data in the format
    fieldName: fieldValue
    where "fieldName" is at the very beginning of the line.

  4. Edit the .glimpse_filters file. Add a line for the type of files you want to index with fields, as follows:
    Where "EXT" is the real extension on the files to be indexed this way, and "WEBGLIMPSE_HOME" is the real path on your system to the Webglimpse home directory.

  5. Edit the wgreindex file. Make sure the -z and -s options are present on both glimpseindex command lines. You may only need to add the -s option.

  6. Run ./wgreindex.

  7. Use the wgindex.html file to perform a field-based search. Make sure to check the Use Filters checkbox.
I know this sounds complicated, but it does work (at least for me)!

Let me know if you try it, have problems, or how it works for you. Thanks!


Docs and Howtos