0

I am making a website where users can upload documents and search also a search functionality to find documents. My question is, how do i add a search functionality that searches not only the title of the document but also the document itself.

Ex.

Title: Reaction to The Perl
Text: {Whole Document}

If we search for 'Kino' (Which is appears in {Whole Document}), this document should show up as a result to the search.

Edit:

Currently I have them uploaded to a folder on the system and the database just contains a title and a link to the file. I have not implemented the search functionality yet.

Also I am using asp.net mvc, and sql server, if that matters.

User456789
  • 397
  • 1
  • 3
  • 16

1 Answers1

1

You could use Lucene.Net to implement the search functionality (available for download from NuGet). You just need to add the documents and fields to a search index and then execute the search through the API.

I find this tutorial for Lucene.Net a useful example.

NightOwl888
  • 55,572
  • 24
  • 139
  • 212
  • Based on what i found about Lucene.Net is that it has a really steep learning curve and uses low level stuff. – User456789 Mar 03 '15 at 01:52
  • Its true that the API is clunky and the number of features it supports makes it overwhelming at first. But it is well documented, has an active community, and there is a book [Lucene in Action](http://www.manning.com/hatcher2/) to help shorten the learning curve. Not to mention, Lucene.Net 4.8.0 is currently in the process of being ported. – NightOwl888 Mar 03 '15 at 05:09