FORMAT MAGNIFY

In this section:

Reference:

The following is a sample MOVIES Master File that contains several field names, which can be used to index the MOVIES data. The movies.mas Master File is located in the \ibi\apps\ibisamp directory of your WebFOCUS Reporting Server installation.

FILENAME=MOVIES,SUFFIX=FOC
SEGNAME=MOVINFO,SEGTYPE=S1
	FIELDNAME=MOVIECODE, ALIAS=MCOD,FORMAT=A6, INDEX=I, $
	FIELDNAME=TITLE, ALIAS=MTL,FORMAT=A39, $
 FIELDNAME=CATEGORY, ALIAS=CLASS,FORMAT=A8, $
	FIELDNAME=DIRECTOR, ALIAS=DIR,FORMAT=A17, $
	FIELDNAME=RATING, ALIAS=RTG,FORMAT=A4, $
	FIELDNAME=RELDATE, ALIAS=RDAT,FORMAT=YMD, $
 FIELDNAME=WHOLESALEPR, ALIAS=WPRC,FORMAT=F6.2, $
	FIELDNAME=LISTPR, ALIAS=LPRC,FORMAT=F6.2, $
 FIELDNAME=COPIES,ALIAS=NOC, FORMAT=I3, $

WebFOCUS developers can use DEFINE fields and AS statements in the report procedure to define the following search components required for each WebFOCUS procedure using Format Magnify:

ALIAS AND PREFIX NAMES

Type

Alias Name or Prefix

Description

Title

SearchTitle

Note: This is required.

A single field, or a concatenation of fields or string. This can include a concatenation of static strings and various columns. The name is case-sensitive and is assigned to the TITLE meta tag.

Unique ID

MagnifyID

Note: This is required.

Primary Key field(s). Unique IDs are unique within each Library Index directory.

Categories

C_ or M_<category>

Note: Although this is optional, it is highly recommended to define some high-level groupings to assist end users in narrowing results sets with the Category Tree.

Category Field name used in the Dynamic Categorization Tree (pre-parsed). It is recommended to use a reasonable amount to avoid information overload to the end user. Category Fields are mapped in the order they appear.

Use underscores to include spaces in the C_ or M_ names.

C_ and M_ are converted to the FX values as part of the feed document output.

The C#_ and M#_ prefixes can be used to set the order of the categories in the Dynamic Categorization Tree.

Note: When using the M# prefix, add A to accumulate all values found at the lowest-level BY statement.

The C_ prefix is converted to the FXV meta tag. The M_ prefix converts to the FXM meta tag in the URL of the record.

Magnify Attributes

Magnify Attributes

Reserved META tag names, which are case sensitive. For more information on the available Meta tags, see Magnify Meta Tags.

Other Attributes

Other Attributes

Any other field or virtual field. All other fields are added as meta tags based on the Field or Alias name and their respective value.

Search Body

S_<fieldname>

Note: This is required.

Concatenation of fields and virtual fields.

The S_ prefix maps to the BODY meta tag in the document and the IBI_CONTENT field in the index library. Fields can be of any data type. The TX fields must be the last field in a PRINT statement.

Search fields can be accumulated by prefixing them with SA_.

Any field of any data type can be assigned the S_ or SA_ prefix.

The procedure must also define the following required Magnify search engine properties, which control the feed process.

CONNECTION STRING ENGINE PROPERTIES

Property

Description

Example

CONNECTION
_ATTRIBUTES

Magnify Indexing Servlet.

http://localhost:8080/ibi_apps/saxfeed

BASEURL

WebFOCUS Report base URL.

http://localhost:8080/ibi_apps/WFServlet

MIME

Document mime type.

text/plain

ACTION

Possible values are as follows:

  • add. Inserts or updates a record. A record is updated if its WF_INDEX_UNIQUE_KEY value already exists in the index. Yearly add is the default value. For more information, see Magnify Meta Tags.
  • delete. The WF_INDEX_UNIQUE_KEY of the record value is found and deleted from the index.

MagnifyAction/A10 = 'add';

DATASOURCE

Magnify index library directory.

Movies [:10KB|MB|GB]

For more information on how dynamic partitioning is configured, see the Magnify Security and Administration manual.

BATCHSIZE

Number of records to burst at a time.

Note: This is always recommended.

100

DELIMITER

Separator for multiple categorizations.

Note: This is used in conjunction with aggregation-based alias names (as seen in next section by c#A_ and SA_).

#!#

FEEDTYPE

(Optional)

Sets the document-level Magnify feed property to determine how data is added to the index. This property can be set to one of the following values:

  • FULL. Adds all data to the index from the data source. If a record is repeated in the feed, it is duplicated in the Magnify index library. Therefore, the full feedtype is recommended only when there are no duplicate records.
  • INCREMENTAL (default). Updates an existing record in the index or adds the data as a new record. The record is first matched using the WF_INDEX_UNIQUE_KEY meta tag. Otherwise, the URL value is used. This mode prevents duplicate records from being added to the index library.

MAGNIFY SET FEEDTYPE = FULL

Note: If the data contains non-ASCII characters, UTF-8 encoding is required and the WebFOCUS Reporting Server must be set to NLS UTF-8. In addition, the ENGINE SET Statements can be overridden on a record by record basis by using the MagnifyBaseURL, MagnifyMime, MagnifyAction, and MagnifyDatasource values.


Top of page

x
Reference: Sample WebFOCUS Procedure

The following is a report procedure that defines the required search properties used to create an index using the MOVIES data. The carmgn.fex and moviesmgn.fex sample procedures are included in the ibisamp directory of the WebFOCUS Reporting Server installation.

-**********Engine settings 
ENGINE MAGNIFY SET CONNECTION_ATTRIBUTES MY_PC
'http://localhost:8080/ibi_apps/saxfeed'
ENGINE MAGNIFY SET BaseURL=http://localhost:8080/ibi_apps/WFServlet
ENGINE MAGNIFY SET MIME=text/plain
ENGINE MAGNIFY SET DATASOURCE=movies
ENGINE MAGNIFY SET DELIMITER=#!#
ENGINE MAGNIFY SET BATCHSIZE=2
-****** required SET command
SET ASNAMES=MIXED
-****** Application Path
APP HOLD test
DEFINE FILE MOVIES
OLD_DATE/I8YYMD= 20100915;
NEW_DATE/YYMD = OLD_DATE;
-****** 
MagnifyAction/A10 = 'add';
SEARCHBODY/TX50=TITLE|CATEGORY|DIRECTOR|RATING;
END
TABLE FILE MOVIES
PRINT
   TITLE       AS 'SearchTitle'
-* Magnify Attribute
   MOVIECODE   AS 'MagnifyID'
   MOVIECODE   AS 'WF_INDEX_UNIQUE_KEY'
-* category variable start with C_
   CATEGORY    AS 'C_CATEGORY'
   DIRECTOR    AS 'C_DIRECTOR'
   RATING
   MagnifyAction
-* search variables start with S_
   TITLE       AS 'S_Title'
   CATEGORY    AS 'S_CATEGORY'
   DIRECTOR    AS 'S_DIRECTOR'
   RELDATE     AS 'S_RELDATE'
   OLD_DATE    AS 'S_OLD_DATE'
   NEW_DATE    AS 'S_NEW_DATE'
   SEARCHBODY  AS 'S_SearchBody'
ON TABLE HOLD FORMAT MAGNIFY AS MAGN_MOVIES_BATCH
END

When the report procedure is executed, the index is generated and the data from the Movie database is available for searching.


Top of page

x
Writing Magnify Feed Documents to Disk

How to:

Modifying ENGINE MAGNIFY SET commands for FORMAT MAGNIFY that instructs the WebFOCUS Reporting Server to write Magnify feed documents to disk rather than posting through HTTP are now supported.



x
Procedure: How to Write Magnify Feed Documents to Disk

You can follow the same instructions that currently exist for configuring FORMAT MAGNIFY with the following differences:

  1. Add the following two lines:
    APP MAP <variable_name> "c:\ibi\WebFOCUS81\magnify\feedcache"
    APP HOLD <variable_name>
  2. Set the ENGINE MAGNIFY SET CONNECTION_ATTRIBUTES parameter to a blank value.
  3. Ensure that the ON TABLE HOLD FORMAT MAGNIFY statement ends with:
    AS <variable_name>

    Otherwise, the following error is generated:

    (FOC44971) Explicit SET command has to be issued for CONNECTION_ATTRIBUTES.

WebFOCUS