Link to home
Start Free TrialLog in
Avatar of JohnLucania
JohnLucania

asked on

Veirty for pdf in MX

Does Verity work with pdf files well?  I have many of pdf files, and want to give users the search function.

For instance, if they type in "vacation" on the search box, the page will need to bring up all of the pdf files containing "vacation".  

Any suggestions?

Avatar of pharmacychoice
pharmacychoice

Yes, just enter in a list of file extensions you would like to include in your cfindex tag or when you are setting up your index if you use the admin.  

<cfindex
   collection = "collection_name"
   action = "action"
   type = "type"
   title = "title"
   key = "ID"
   body = "body"
   custom1 = "custom_value"
   custom2 = "custom_value"
   custom3 = "custom_value"
   custom4 = "custom_value"
   category = "category_name"
   categoryTree = "category_tree"
   URLpath = "URL"
 ** extensions = ".PDF"  <-------------------here
   query = "query_name"
   recurse = "yes" or "no"
   language = "language"
   status = "status"
   prefix = "location of documents">
Avatar of JohnLucania

ASKER

great!

Do you have an example of cf pages with Verity for pdf?  I want to get a clearer picture how all pieces work together.
This is an example of indexing.

<cfset extensions = ".cfm,.htm,.html,.pdf">
<cfset collection = "myCollection">

<CFCOLLECTION ACTION="create"
                    COLLECTION="#VARIABLES.collection#"
                    PATH="D:\CFusionMX\verity\collections"
                    LANGUAGE="English">

<cfquery name="qry_getArticles" datasource="myDB">
      SELECT      ID, TITLE, BODY, INSERT_DATE
      FROM      ARTICLEs
      WHERE      APPROVED      =      1
      and insertdate >= <cfqueryparam cfsqltype="cf_sql_date" value="#dateadd('d',-90,now())#">
</cfquery>

<cfindex action="update"
             collection="#VARIABLES.collection#"
             key="ID"
             type="Custom"
             urlpath="http://www.mysite.com"
             title="TITLE"
             query="qry_getArticles"
             body="BODY, TITLE"
             custom1="Article"
             language="English"
>
ASKER CERTIFIED SOLUTION
Avatar of pharmacychoice
pharmacychoice

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial