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:
| 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:
| 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.
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.
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.
You can follow the same instructions that currently exist for configuring FORMAT MAGNIFY with the following differences:
APP MAP <variable_name> "c:\ibi\WebFOCUS81\magnify\feedcache"
APP HOLD <variable_name>
AS <variable_name>
Otherwise, the following error is generated:
(FOC44971) Explicit SET command has to be issued for CONNECTION_ATTRIBUTES.
WebFOCUS |