MVC 3 - The best way to create a search in my "Views",

I am wondering what is the best way to create a site search in MVC 3. I would like to somehow index all my static .cshtml text and it can be searched.

I searched a bit and thought that IndexTank might be a way, but it seems like it was recently acquired and is no longer supported.

I am new to MVC, so the easiest route is what I do here. :)

Thank!

+3
source share
2 answers

Move your static content to resource files, and then search the resource files using something like Lucene.net

http://www.ifdefined.com/blog/post/2009/02/Full-Text-Search-in-ASPNET-using-LuceneNET.aspx

+1

Google -, .

<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/search">
  <label for="q">Search:</label>
  <input id="q" name="q" size="20" maxlength="255" value="" type="text"/>
  <input name="domains" value="http://www.mydomain.com/" type="hidden"/>
  <input name="sitesearch" value="http://www.mydomain.com/" checked="checked" id="mysite" type="radio"/>
  <label for="mysite">Just this site</label>
  <input name="sitesearch" value="" id="www" type="radio"/>
  <label for="www">WWW</label>
  <input name="btnG" value="Go" type="submit"/>
</form>
<!-- SiteSearch Google -->
+3

All Articles