Click here to Skip to main content
15,886,823 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to create a search engine for a web based application.i want to implement a content based searching. i.e. if the user searches using some text from some file as a keyword, the application should be able to find out that file. (just like the windows capability of "search for a file or folder using a word or a phrase contained in that file"). First thing, As of now I have the files in a folder on the server. Will the files have to be in a database to incorporate this. Or will I be able to incorporate the content based search capability even when the files are on a disk?
Can some one help me with example code??

I am using C# and ASP.NET.

Thanks.
Posted
Comments
[no name] 15-Mar-13 9:03am    
Example code for what exactly? How to get a list of files in a directory?
hinaiqbal 15-Mar-13 9:09am    
example code for searching the files when keywords entered in search box and the files which contains those keywords should be listed in the grid
[no name] 15-Mar-13 9:27am    
So basically, you want someone to write all this code for you. Care to try again? Why not go try and do something and then come back here and ask a specific question about a specific programming problem.
hinaiqbal 15-Mar-13 9:34am    
no i don't want that someone to write the whole code for me.. i just want that some one give me a basic idea of how to do it so that i can implement it
[no name] 15-Mar-13 9:41am    
Then why did you ask for example code? That means you want someone to write this code for you. You already have the idea, get a list of files and put them in your grid. What exactly is the problem?

1 solution

Your answer isn't trivial.
There are a lot of articles that deal with text search using db servers like SQL Server or using search engines like Solr.
Furthermore, there are problems related to the extraction of plain text from formatted files like pdf or office documents.
The following articles should be a starting point for a more in-depth reseach:
on Lucene.Net DotLucene: Full-Text Search for Your Intranet or Website using 37 Lines of Code[^]
on SorlNet Using Solr for Search with .NET(C#)[^]
on SQL Server SQL Full Text Search Programming[^] and SQL SERVER - 2008 - Creating Full Text Catalog and Full Text Search[^]
 
Share this answer
 

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