Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all.

I saved files ( for example: doc or pdf files) in Sql Server Database.
Now i am going to search a word or sentence inside files saved in it.

Is it possible?
If it's possible:
1- How do i do it?
2- How do i retrieve result of searching ( for example: retrieve pages that they contain that a word or sentence )?

TNX
Posted

1 solution

What do you mean you saved the files in the database? Their paths or their actual contents?

Anyway, if you want to do this efficiently, you should take a look at clustering algorithms. Start here then move on to something more algorithmic.

Be warned though, if this is something you know nothing about, you wont do it in one afternoon.

cheers
 
Share this answer
 
Comments
saeid2010 3-Jul-11 3:06am    
Dear AndreFratelli

There are File's contents(There aren't path of Files). I have a column in Database table that there are for example: book1.pdf, book2.doc, ... (book1.doc isn't name or path, it's a Microsoft Word File. also it save in Database as bytes)

Now i am going to search a word or sentence in the column.

Can the clustring use on the column ( in the column are Files )?

TNX for your answer
AndreFratelli 4-Jul-11 11:33am    
I don't think so. You have to fetch the data and apply the algorithm to it outside the database. I don't recommend it though.. Instead, you should save paths and store clustered information about the files (using IDs).
AndreFratelli 3-Jul-11 13:18pm    
I'm not "cheers"... See here

Sorry, but can you be a bit clearer? I don't understand what you'r saying...
saeid2010 3-Jul-11 18:36pm    
I'm sorry.My mind got distracted for a second
I corrected my last comment.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900