×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Verity

What is Verity & how do I use it? by RichardBro
Posted: 5 Sep 00

Verity is a very powerful 'full text' search tool, which can handle and index a wide variety of file formats.

The version that ships with CF is a slightly limited in that it only has provision for only two structured fields (Custom 1 & 2).

CF accesses verity through the following tags :
 CFCollection
 CFIndex
 CFSearch

CFCollection provides the maintainence functionality
CFIndex provides the mechanism to add/modify/delete entries
CFSearch provides a way of getting the documents back

How to set up a collection.

Creating a collection can be done either throught the Verity option in the CF Administrator or by using CFCollection with a 'create' action.

eg. <CFCOLLECTION action="CREATE" collection="CollectionName" path="Collection Path">

Note Path is only needed if you want to create a collection in a new location.

Verity requires unique collection names, even if the collectionas are in seperate folders.


Adding Some Content

Additions can be done either en masse or individually, both routes use the CFIndex tag.

eg.

for a single file:

<CFINDEX action="UPDATE" collection="Collection Name" key="Filename" type="FILE" custom1="Structured Field #1" custom2="Structured Field #1" urlpath="URL of file path" language="English">

For an entire folder:

<CFSET IndexCollection = "vtest">
<CFSET IndexDirectory = "e:\webdev\agendademotest\documents\">
<CFSET IndexRecurse = "YES">
<CFSET IndexExtensions = ".doc, .htm, .html, .txt, .xls">
<CFSET IndexLanguage = "english">

<CFINDEX
collection="#IndexCollection#"
     action="REFRESH"
     type="PATH"
key="#IndexDirectory#"
extensions="#IndexExtensions#"
  recurse="#IndexRecurse#"
language="#IndexLanguage#"
urlPath="151.176.178.172/agendademotest/documents/">

When you index a path, you can specify the file types to be indexed (obviously not needed when you do a single file.)

[Red]!!!! VERY IMPORTANT !!!!![/Red]

Once a file is indexed, it MUST NOT be moved or renamed, if it is, verity will still find the index entries, but you won't be able to retreive the file.


Getting files back

This uses the CFSearch tag:

eg.

<CFSET SearchDirectory = "e:\webdev\menu\agendademotest\documents">
<CFSET SearchCollection = "membersagendatest">

<CFSEARCH
name = "GetResults"
collection = "#SearchCollection#"
criteria = "#Form.Criteria#">

This return a query with the following contents

Score - a numeric value (0 to 1)that represents the relavence of the record (multiply by 100 to give a %).
Title - The title of the Document (file) eg the title that is set as a property in word.
Summary - an abstract of the document (the first paragraph or upto the first 500 characters).
Key - the name and location of the file (url)
Custom1 - User defined content that was added during the CFIndex routine
Custom2 - User defined content that was added during the CFIndex routine

All of the above are accessable as variables from a normal CFQuery

Back to Adobe FAQ Index
Back to Adobe Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close