reset password
Author Message
hmodi
Posts: 27
Posted 11:19 Nov 21, 2010 |

Hi,

I did implement FTS on file content. And to do so I read the file content and insert into column in Database. But this doesn't seem right to keep the file content at two different places!

So is there is a better way of doing, i.e., read the file content, use for tx_vector query. Meaning without inserting file content into Database.

Thanks and Look  forward for reply.

cysun
Posts: 2935
Posted 12:23 Nov 21, 2010 |

Keeping file content both in database and on disk is fine. The file content in database is different from the original file as it's plain text only and sometimes is much shorter (e.g. some FTS solutions only index and search the first 5000 words of a document), and it's necessary for things like highlighting query terms in results.