How to search a varbinary field in SQL Server?

前端 未结 2 1428
生来不讨喜
生来不讨喜 2020-12-22 06:06

I have an application where I allow users to upload files, mainly PDF and Word documents. These files are stored in a varbinary field in the database. For what it is worth,

相关标签:
2条回答
  • 2020-12-22 06:48

    I would say that using SQL Server is the wrong tool for the job (search-wise) as it can't natively parse through the text stored in a binary document.

    I suggest looking in to something like Lucene.NET (the .NET port of the Lucene Search Engine...originally written in Java) which will allow you to easily search through your documents after they've been uploaded.

    You should be able to architect a solution that allows you to retain your document storage in SQL Server but use Lucene.NET to index and search the documents that you have stored there.

    0 讨论(0)
  • 2020-12-22 06:52

    You need a layer of some code to extract the type and have knowledge of the format. To SQL, it's just raw data

    0 讨论(0)
提交回复
热议问题