Filtering by Date of Publication and other information in the MARC Record

In Webpac, you can filter your keyword searches using any information in your MARC record, such as Language, Publication Date, Edition, etc. You can even filter against a combination of information from different parts of the MARC record, such as French publications published after 1987.

For WebPAC to filter MARC information, you first need to use the Horizon Table Editor to define a MARC mapping that specifies the part of the MARC record where the information is located for the PAC flavor that WebPAC is using. This involves updating two tables,

The connection between extracted MARC Bibliographic information in the Horizon database, used for sorting and/or filtering search results, and the display on the WebPAC Briew View is


STEP 1.
In order to find or create the necessary MARC Map codes, you first need to select the "PAC Control Menu (PacCtl)" option listed on the Administration Menu (MAdmin) within the Horizon Menu Manager.

STEP 2.
Select the "MARC Map Table (MarcMap)" option to display the list of MARC Map codes in the Horizon Table Editor.

STEP 3.
Either select an existing MARC Map item and click "Edit" to determine if it already meets your needs, or click "New" to create a new mapping to specific MARC information.

WARNING! Do not change the MARC mapping information on an existing item since it may already be used for indexing or other critical MARC bibliographic related functions. It is better to create a completely new MARC Map item.

STEP 4.
Determine whether the fields of the existing item meet your needs, or fill in the fields of the new item with the information that you need WebPAC to filter by.

  • The Marc_map Code field is the case-sensitive unique code that will be added to the Z39.50 Sort file.

  • The Description field is any text clearing describing the information being mapped from the MARC record and does not apply to WebPAC.

  • The Search Limit? checkbox field indicates whether the item should be listed as a limit option in the main Horizon product searching, so it should be left unchanged on an existing item or left unchecked when creating an item for WebPAC.

  • The Sort Filter radio button field defaults to "No Filter", and should only be set to "Year (4 digits)" if you are only interested in using year information from the MARC record, or "Numeric Value (decimal optional)" if the information is always a number.

  • The Run-on radio button field does not apply to WebPAC.

  • The Extraction blink (box) contains one or more groups of tags and subfields or fixed field locations within the MARC record where the information to filter by is located. The order that you enter the tags determines the order that the tag information is extracted from the MARC record for comparison during the filtering process.

    • The Tag field is the number of the tag in the MARC record.

    • The Part field is a list of subfield characters and/or fixed field locations of the tag where the information to filter by is found.

      • To specify the subfields a, b, c, d and h enter "abcdh". Each subfield character or number can also be separated by a space or comma.
      • To specify the fixed field position starting at 14 having a length of 2 enter "/14.2".
      • To specify a fixed field within a subfield enter the subfield character, then the fixed field information, and enter a space or comma before any following subfields. For example, "a/8.2,h".

    • The rest of the fields do not normally apply to WebPAC and should be left empty.

  • The Conditional blink (box) contains one or more groups of information that does not apply to WebPAC.

STEP 5.
Once all the fields have been filled in with the information necessary for the WebPAC filter, click "Save" to save the new MARC Map item, then click "Close" to close the new or previous item that you accessed.

Next, you need to determine the Bib List View included in the PAC Flavor used by WebPAC.

STEP 6.
In the Horizon Menu Manager, select the "PAC Flavor Table (Flavor)" option listed on the PAC Control Menu (PacCtl) to display the list of Public Access "Flavors" in the Horizon Table Editor.

STEP 7.
Highlight the PAC Flavor used by WebPAC and click "Edit" to display the current field values.

STEP 8.
Note the name of the Horizon View assigned to the Bib List View field, then click "Close" to close the WebPAC PAC Flavor, and then close the view listing the PAC Flavors. You are now ready to make sure that the MARC Map code has been assigned to the Horizon View just determined.

STEP 9.
In the Horizon Table Editor, open the Horizon View Definitions (mq_view).

STEP 10.
Enter the name of the Horizon View specified in the Bib List View field of the PAC Flavor table used by WebPAC, then click "OK".

STEP 11.
Click "Edit" to display the current field values for the single Horizon View listed, then page down to page 3 where the marc_map field should be visible within the List View blink (box).

STEP 12.
Scroll through the list of List View options to see if the MARC Map code you created or found is already included. If the code is not found, click "New" to bring up a new List View group of fields that will include the MARC Map code.

  • The Column Name field is the name of the key column in the MARC Bibliographic record database table where the MARC Mapped information is found. It is normally "bib#" and should have the same value as the same field in the rest of the List View groups of fields.

  • The Ord field is the order of the List View drop box options and should be a number at least 10 greater than the last option already listed. It does not affect the order of anything in WebPAC.

  • The Column Label field is any text clearing describing the MARC Mapped information and does not apply to WebPAC.

  • The No. of Display Characters field is the number of characters it would take to display the MARC Mapped information in a list column. Any number from 10 to 80 should be acceptable.

  • The Pad Character field is also used for list column formatting and should be left empty.

  • All the check boxes in the Properties field should be left unchecked.

  • The marc_map field is the code, for the MARC Map you just created or found, used to extract the MARC Mapped information. If you do not remember the code, click the "Codes" button and select it from the list of codes displayed.

STEP 13.
If you had to create a new List View group for the MARC Map code click "Save" to save the field information you just entered, then click "Close" to finish making changes to the Bib List View.

You are now ready to add the MARC Map code to the Z39.50 Sort file used by WebPAC.


STEP 14.
Modify the Sort file used by the Z39.50 Server (Zdaemon) to include the case-sensitive MARC Map code you created or found using the Horizon Table Editor and an unused Use Type attribute number (a number in the range 5500-8500 usually works well) which you will later include in the Connection CFM file used by WebPAC.

The Sort file (normally named "sort.txt"), a text file referenced by the "/S (capital S)" argument to the Zserver program "zdaemon.exe" or "zdaemon", is found in the Zserver directory. The arguments for the Zserver are normally specified in the "zdaemon.arg" file.

This file is organized in separate sections, each section being optional.

  • The first line specifies the maximum resultset size (maxrset) past which the result set will not be sorted at all. This gives you some control over the performance impact of sorting.

  • In the [Sort] section, all use attributes for sorting are listed. Each use attribute is followed by one or two comma-separated MARC Map codes, and each code is followed by a colon (:) and an A for ascending or a D for descending sort order. The zero (0) use attribute is the default sort order.

  • In the [Restrict] section, you can establish a mapping between unused Use Type attribute numbers and MARC Map codes.

STEP 15.
Save your changes to the Sort file and then re-start the Zserver.

You can now proceed with the modifications to the WebPAC Connection CFM file and HTML Search Template file.


STEP 16.
Add the Use Type attribute number you included in the Z39.50 Sort file, for each type of comparison to perform, to the Connection CFM file used by WebPAC.

 WebPAC 1.2, Connection CFM, Search Types Section
  # Name Qualifier Category Use Structure Truncation Relation Position Completeness Scannable Normalize  
  Publication Date On, PDEQ, 0, 5555, 2, 100, 3, 0, 0, 0, 1,  
  Publication Date Not, PDNE, 0, 5555, 2, 100, 6, 0, 0, 0, 1,  
  Publication Date After, PDGT, 0, 5555, 2, 100, 5, 0, 0, 0, 1,  
  Minimum Publication Date, PDGE, 0, 5555, 2, 100, 4, 0, 0, 0, 1,  
  Publication Date Before, PDLT, 0, 5555, 2, 100, 1, 0, 0, 0, 1,  
  Maximum Publication Date, PDLE, 0, 5555, 2, 100, 2, 0, 0, 0, 1,  

 WebPAC 1.3, Connection CFM, SearchAttributes Section
  // Name Qualifier View Category Scannable Normalize Attribute Set ID   Use Structure Truncation Relation      
  [Publication Date On, PDEQ, BRIEF, 0, 0, 1, BIB1,  [  [1,5555,] [4,2,] [5,100,] [2,3,]] ]
  [Publication Date Not, PDNE, BRIEF, 0, 0, 1, BIB1,  [  [1,5555,] [4,2,] [5,100,] [2,6,]] ]
  [Publication Date After, PDGT, BRIEF, 0, 0, 1, BIB1,  [  [1,5555,] [4,2,] [5,100,] [2,5,]] ]
  [Minimum Publication Date, PDGE, BRIEF, 0, 0, 1, BIB1,  [  [1,5555,] [4,2,] [5,100,] [2,4,]] ]
  [Publication Date Before, PDLT, BRIEF, 0, 0, 1, BIB1,  [  [1,5555,] [4,2,] [5,100,] [2,1,]] ]
  [Maximum Publication Date, PDLE, BRIEF, 0, 0, 1, BIB1,  [  [1,5555,] [4,2,] [5,100,] [2,2,]] ]
Note that in WebPAC 1.3 the Z39.50 attribute type/value pairs, surrounded by square brackets, are usually placed on a separate line, and the closing bracket on a third.

  • The Use attribute number is set to the value added to the Z39.50 Sort file (5555),
  • the Structure attribute number is set to Keyword (2), since search filter restrictions only apply to keyword indexes,
  • the Truncation attribute is the value for disabled (100), and
  • the Relation attribute number has the value for the type of comparison to perform
    (1 = less than, 2 = less than or equal to, 3 = equal to, 4 = greater or equal, 5 = greater than, 6 = not equal to).

STEP 17.
Modify the HTML Search Template file to include the case-sensitive MARC Mapped Information Filter Qualifier codes you added to the Connection CFM file.

This usually involves adding a select list or drop box option containing the filtering code to the template file and possibly an input prompt for entering the information to compare against. For example,

     WebPAC 1.2, Search Template
    <font size="-1">Limit Keyword Search to Publication Dates:</font><br>
    <select name="DATEFILTER">
        <option value="">All Dates
        <option value=" and $${DATEINPUT}.PDEQ.">On
        <option value=" and $${DATEINPUT}.PDNE.">Excluding
        <option value=" and $${DATEINPUT}.PDLT.">Before
        <option value=" and $${DATEINPUT}.PDGT.">After
        <option value=" and $${DATEINPUT}.PDLE.">On or Before
        <option value=" and $${DATEINPUT}.PDGE.">On or After
    </select>
    <input type=text name="DATEINPUT" size=10>

     WebPAC 1.3, Search Template
    <font size="-1">Limit Keyword Search to Publication Dates:</font><br>
    <select name="DATEFILTER">
        <option value="">All Dates
        <option value=" and PDEQ $${DATEINPUT}">On
        <option value=" and PDNE $${DATEINPUT}">Excluding
        <option value=" and PDLT $${DATEINPUT}">Before
        <option value=" and PDGT $${DATEINPUT}">After
        <option value=" and PDLE $${DATEINPUT}">On or Before
        <option value=" and PDGE $${DATEINPUT}">On or After
    </select>
    <input type=text name="DATEINPUT" size=10>

Alternatively, you may include codes for specific MARC Mapped fixed field information that you are filtering by. For example,

     WebPAC 1.2, Search Template
    <font size="-1">Limit Keyword Search to Texts Written in:</font><br>
    <select name="LANGFILTER">
        <option value="">Any Language
        <option value=" and eng.LANGEQ.">English
        <option value=" and fre.LANGEQ.">French
    </select>

     WebPAC 1.3, Search Template
    <font size="-1">Limit Keyword Search to Texts Written in:</font><br>
    <select name="LANGFILTER">
        <option value="">Any Language
        <option value=" and LANGEQ eng">English
        <option value=" and LANGEQ fre">French
    </select>

STEP 18.
If necessary, modify all occurances of the value of the Search Query Command HTML Tag (the tags having the name "SCMD") within the HTML Search Template file, to include the names of the HTML Select Tags, formatted as $${tagname}, containing the search filter options. For example,

    <input type="Hidden" name="SCMD"
      value="${RUNKEY} ${SESSIONKEY} $${QUERY} $${INPUT} $${DATEFILTER} $${LANGFILTER}">

 


Copyright © 1999-2000 epixtech, inc. All rights reserved.
Please email any comments, questions & suggestions to p.roberts@epixtech.com