vspider: Remapping fields in collections
Different Verity collections are populated with different fields depending on the type of file format being indexed and the configuration settings of the engine. CFSEARCH presents a constant resultset as ColdFusion generated collections have a set of user defined (well Macromedia dev team defined) fields which are always mapped to relevant fields from the collection.
If you use the browse utility to inspect a collection you should be able to see the relevant CF_ fields. These are mapped to the query columns in the result set as shown below:
VERITY FIELD = CFML COLUMN NAME
-------------------------------
SCORE = SCORE
CF_KEY = KEY
CF_TITLE = TITLE
CF_CUSTOM1 = CUSTOM1
CF_CUSTOM2 = CUSTOM2
CF_URL = URL
VDKSUMMARY = SUMMARY
In the case of the Verity Spider collection the correct mappings have not been made. This is why the resultset coming back from the default collection is missing KEY and URL columns. Obviously a search resultset without a primary key is not much use at all.
You can modify the field mappings by creating relevant aliases in the style.sfl configuration file and repopulating the collection. The following download is a modified style.sfl that contains relevant mappings for the Verity Spider collection.
Download: Style.sfl for VSpider
An example of the modification to the file is listed below. The relevant aliases are highlighted in bold. There are many different ways the fields could have been mapped and changing what i've done should be simple enough.
# These are required fields for vspider, used to
# determine the update frequency of documents.
varwidth: _Modified _sv
/alias = CF_CUSTOM1
varwidth: _Created _sv
/alias = CF_CUSTOM2# The following fields are filled in by vgw_url, vspider
varwidth: Comments _sv
varwidth: Ext _sv
varwidth: URL _sv
/alias = CF_URL
/alias = CF_KEY
fixwidth: Size 4 unsigned-integer

