Вопрос

I'm looking for a solution to search email files for a custom made email suite (similar to a call center but for emails instead of calls) for the company I work for.

The problem I'm running into is when I want to perform an email search (body text), traversing through a directory and looking for a string takes a long time when the directory contains several thousand files. Unfortunately the files are not located on the same system as the client PC who is performing the search.

However the PC that has the files is on the same system that the email Service is running on. I have decided to only place very important information into the database (email id, thread id, subject, to, from, date received). I have decided against placing the body in the database and the library that I'm using for this (OpenPop) doesn't make it easy to pull data from the DB to generate a "Message" object without placing the entire file into a single column.

Is there an easy way to setup file cataloging on SQL Server 2005? Or might there be a better way to go about providing a search feature for this? Unfortunately I don't have a lot of development time to spend creating a custom search engine from scratch, and we aren't going to buy proprietary software to do this.

I have seen some Java & web based solutions for this, but I'm looking at either the SQL Server solution, or possibly working with the language we use here (C# / .NET 4.0) to implement a solution.

Это было полезно?

Решение

SQL Server does provide full text search tools for data contained in a table. It does not support full text search for external data.

If you don't want to use another library for your file based search I suggest stuffing the data into tables and using the full text search tools sql server provides, they are not hard to use, not expensive (esp. since you already have sql server) and should be quite quick to integrate. The only downside is increased disk space usage.

Disks tend to be cheap so this should not be an issue, unless you are using an expensive hoster.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top