Indexing the Course File

This section provides steps to review data and identify how fields will be used for search in order to build a WebFOCUS procedure to create Magnify index libraries.

  1. Create a procedure to review all available data.
    1. In Developer Studio, create a project pointing to the sample directory, ibisamp, if not already created.
    2. In the ibisamp project, create a new procedure.
      • Right-click the Procedures folder, select New, and then Procedure.
      • Enter the file name courses_all.
      • Click the Open button.
    3. In the Procedure Viewer, create a Report object.
      • Click the diamond icon and select the Report object.

      • Select the course.mas Master File.
      • Click the Open button.

      • In Report Painter, add all the fields to the report canvas.
        • Double-click on the segment CRSELIST.

      • Click Save and then click Run.

    4. Identify fields to assign to the Magnify Category Tree.

      Note: Usually fields that make high-level groupings, typically those used as BY fields, make good categories. Although numerical values, like price, usually do not make good categories as is, they make excellent categories when converted to a range.

    5. Identify fields to make searchable from the Magnify search interface.

      Note: Searchable fields tend to be those that are alphanumeric strings, IDs, or any other data that is to be matched to searched terms.

    6. Close the Developer Studio Viewer.
    7. Close Report Painter.
    8. Close the Procedure Viewer window.
  2. Create a procedure to transform the data into search content.
    1. In the ibisamp project, create a new procedure.
      • Right-click the Procedures folder, select New and then Procedure.
      • Enter the file name: courses_transform.
      • Click the Open button.
    2. In the Procedure Viewer, create a Define object.
      • Click the diamond icon and select the Define object.

      • Select the course.mas Master File.
      • Click the Open button.
    3. In the Define object, create fields to enrich the data, as defined in the table below.
      • Add each define attribute using the Field, Format, and Value information shown in the table, as shown in the following image.

      • Confirm that there are no errors by clicking the Check button.
      • Create the next Defined field by clicking the New button.
      • Repeat for each field listed below.

        Note: You can copy and paste Field, Format, and Value information from the table below into their respective places in the Define object.

        Field

        Format

        Value

        Purpose

        SYSSOURCE

        A25

        'School Courses'

        Hard-coded category value.

        TUITION_RANGE

        A50

        IF COURSE.CRSELIST.TUITION LT 1000
        THEN '1. Under 1K' ELSE IF
        COURSE.CRSELIST.TUITION LT 2000 
        THEN'2. 1K-2K' ELSE '3. Over 2K'

        Granular data rolled up into a range.

        SEARCHTITLE

        A2000

        '<b>Course Name:' | COURSE.CRSELIST.CTITLE |'('|COURSE.CRSELIST.COURSECODE ||')</b>'

        Text shown as the Search result main title.

        TITLE_URL

        A2000

        '/ibi_apps/WFServlet?' || 'FXK=' || COURSE.CRSELIST.COURSECODE ||'&'||'IBIF_ex=courses_detail' ||'&'|| 'IBIAPP_app=magnify_courses'

        The main drill down link for the main title of the search results. In this case, a BI report passing the course code.

        LINK_DISPLAY_NAME1

        A2000

        'Search Other Department Courses'

        Additional drill-down text.

        LINK_URL1

        A2000

        'ibi_apps/search' ||'q='|| COURSE.CRSELIST.SOURCE

        Additional drill-down link.

        LINK_DISPLAY_NAME2

        A2000

        'All Courses in this Subject'

        Additional drill-down text.

        LINK_URL2

        A2000

        '/ibi_apps/WFServlet?' || 'FXK=' || COURSE.CRSELIST.CLASSIF ||'&'||'IBIF_ex=courses_similar' ||'&'|| 'IBIAPP_app=magnify_courses'

        Additional drill-down link.

        HARDCODED

        A50

        'schools course'

        Additional searchable content not originally found with the data.

        For more information, see Indexing Using the FORMAT MAGNIFY Command.

        Note: The URL value being referenced for the TITLE_URL and Link_URL2 fields does not exist. Therefore, when executed, the links for the main title link and second additional link of the search results will not drill down to a valid webpage.

      • Close the Define object by clicking the OK button.
    4. In the Procedure Viewer, create a Report object.
      • Click the diamond icon and select the Report object.
      • Select the course.mas Master File.
      • Click the Open button.
    5. In Report Painter, add the following fields:
      • In the Object Inspector, double-click the field name for all fields defined in the following table.
      • Update the Column Title.
        • On the report canvas, select the added field.
        • Right-click and select Column Title.

        • Enter a new Column Title (case-sensitive), as shown in the table below.
        • Click the OK button.
      • Repeat step 2e for each Field listed below.

        Field

        Column Title (Case-Sensitive)

        Purpose

        COURSECODE

        MagnifyID

        Unique identifiers (required)

        COURSECODE

        WF_INDEX_UNIQUE_KEY

        Unique identifiers (required)

        SYSSOURCE

        C1_Source_System

        Category

        SOURCE

        C2_Department

        Category

        CLASSIF

        C3_Subject

        Category

        TUITION_RANGE

        C4_Tuition_Range

        Category

        SEARCHTITLE

        SearchTitle

        Drill down link information

        TITLE_URL

         

        Drill down link information

        LINK_DISPLAY_NAME1

         

        Drill down link information

        LINK_URL1

         

        Drill down link information

        LINK_DISPLAY_NAME2

         

        Drill down link information

        LINK_URL2

         

        Drill down link information

        DESCRIPTN1

        S_DESCRIPTN1

        Searchable content

        DESCRIPTN2

        S_DESCRIPTN2

        Searchable content

        DESCRIPTN3

        S_DESCRIPTN3

        Searchable content

        CTITLE

        S_CTITLE

        Searchable content

        COURSECODE

        S_COURSECODE

        Searchable content

        SYSSOURCE

        S_SYSSOURCE

        Searchable content

        SOURCE

        S_SOURCE

        Searchable content

        CLASSIF

        S_CLASSIF

        Searchable content

        HARDCODED

        S_HARDCODED

        Searchable content

        Note: The resulting column title dictates how the data will be used in the search interface.

        For more information, see Indexing Using the FORMAT MAGNIFY Command.

      • Click Save and then click Run.
      • Review how the data is applied in their respective column titles.

      • Close the Developer Studio Viewer.
      • Close Report Painter.
      • Return to the Procedure Viewer.
  3. Update the procedure to feed data to the Magnify index library.
    1. In Procedure Viewer, create an Engine object.
      • Create each Engine object, as shown in the following table.
      • Click the diamond icon and select the Engine object.

      • Add each Engine attribute using the Engine, Connection, and SET parameters information in the following table.

        Note: You can copy and paste connection or SET parameter information from the table below to their respective places in the Engine object.

      • After each entry, click the OK button.
      • Repeat step 3a for each Engine component listed below.

        Note: If the engine (MAGNIFY) (case-sensitive) does not display in the list, you must type it in manually. In addition, for connections listed as no connection, you must select no connection in order to activate the SET parameter field. The prior image shows an Engine entry.

        Engine

        Connection

        SET parameter

        Purpose

        MAGNIFY
        MY_PC 'http://localhost:8080/
        ibi_apps/saxfeed'

        Connection string

        Note: Sample or default URLs are for informational purposes only and may not resolve correctly, if at all.

        MAGNIFY
        -- no connection --
        BASEURL=http://localhost:8080/

        Feed URL ID

        MAGNIFY
        -- no connection --
        DATASOURCE=school_courses

        Index library name

        MAGNIFY
        -- no connection --
        BATCHSIZE=5

        Feed increment

      For more information, see Indexing Using the FORMAT MAGNIFY Command.

    2. In the Procedure Viewer, create a Set object.
      • Create the Set object before the Define object and after the Engine objects.
      • Click the diamond icon and select the Set object.

      • Double-click the Available Settings: ASNAMES.
      • Select the Current Value: MIXED.
      • Click the OK button.

      Note: You must set the ASNAMES setting to MIXED in order to preserve case-sensitivity. For more information, see Indexing Using the FORMAT MAGNIFY Command.

    3. In the Procedure Viewer, click Save and then click Run.
      • Select the Report object.
      • Click Save and then click Run.
      • Confirm no errors.
      • Confirm that raw data is modeled and enriched accordingly.
      • Close the browser.
    4. Change the output type in the Report object.
      • Double-click the Report object to open Report Painter.
      • Click the Options button on the toolbar.

      • Select the Output Format drop-down.
      • Expand the Unstyled Formats folder.
      • Select Format Magnify (MAGNIFY).
      • Click the Apply button and then click OK.

      • Click Save and then click Run.

      • Confirm that there are no errors.

    Note: If you receive an error message indicating that your Magnify server is not licensed for indexing, please contact your WebFOCUS Administrator. For more information on this error message, see Magnify Error Handling.

  4. Once complete, review the search-based application generated.
    1. Open an Internet browser.
    2. Navigate to the Magnify search page:
      http://host:port/wfcontext_root/search

      where:

      host:port

      Is the machine name and port number where WebFOCUS is installed.

      wfcontext_root

      Is the WebFOCUS application root.

      Note:

      • By default, this can be http://localhost:8080/ibi_apps/search, however, this link can vary based on your WebFOCUS configuration.
      • Sample or default URLs are for informational purposes only and may not resolve correctly, if at all.

    3. Perform a search test by entering school in the Search box and clicking Search.

    4. Review the results returned and search to identify how the data has been applied to the Magnify search interface.
    5. Close the browser window.
    6. Close Report Painter.
    7. Close the Procedure Viewer window.

WebFOCUS