Skip to main content
Participating Frequently
November 24, 2009
Question

Reading content to insert into a database for file content searches

  • November 24, 2009
  • 2 replies
  • 289 views

I have a new challenge that has been brought to me.

There is and existing application that has files being inserted into the database and the customer is having great difficulty in being able to have a search capability against those files. I was thinking that I could do a secondary lookup before the file is actually uploaded and there would be use of the cffile to read the file then insert that data from the read and insert that data into a column of that database the equiled that record. The most important part of this is that the file's content is read from cffile and inserted into a column that actually get's that data into the RBDMS system that will allow for a full text search that would point to that system.

Any other ideas of how to insert document content into a data record other than using the cffile tag would be most appreciated.

Thanks in advance.

Gene

    This topic has been closed for replies.

    2 replies

    ilssac
    Inspiring
    November 24, 2009

    Most, if not all, database management systems have their own features to read text data from files.  You may prefer that functionality over piping the data through ColdFusion and the database drivers.

    <cffile...> can "read" .doc and .pdf file as in it can read the file from the file system as the binary data they are, but that does not extract the text from the content.  You can do some stuff with CFML to read the text in a pdf file with the <cfpdf...> and related tags and functions.  I'm not aware of similar CFML features that work with doc files, but I know of Java tools that do such as POI.  These are usually fairly straight forward to tap into with ColdFusion.

    Participating Frequently
    November 24, 2009

    The other thing to pay attention to is also if cffile can read

    .doc files and or

    .pdf files.

    Curious................................:-)