.net search algorithm? - asp.net

I'm writing a ASP.net web app where users will be able to add wordy descriptions to a database table and was just wondering if there's some sort of (free) .net search plugin I could use to search through the database. I could write a simple SQL query to do it but I'd rather it be more robust and like a google search.

If your database is SQL Server, then you use SQL Server full text search. It's right there, and has google-like semantics.

you are probably looking for lucene.net which a port of lucene. Provide search capabilities for arbitrary document (so you can also index database text with it).
But I think you would rather index the html renders of your database entries (which lucene does beautifully).

Related

How can I create a searchable document repository for Azure application?

We have a client requirement to upload documents (Word Doc and possibly PDF) to our Azure hosted application and have full text search on the document.
My understanding is that SQL Azure doesn't support full text indexing so I can't just store them in the DB.
Has anyone done anything similar? If so how? Are there any Nuget packages or things I can install into the Azure role etc when I create it? Is blob storage serachable/indexable?
Any ideas?
I would suggest using Lucene.NET along with your data. Take a look at:
http://code.msdn.microsoft.com/windowsazure/Azure-Library-for-83562538
If you are doing this now and you are using Azure. It is best to combine this with Azure Search Service. It has stacks of features and you can add text and meta data to allow fast searching. It has various options options indexing blob etc blob indexing

Search with ASP.net and SQL Server 2008

I'm about to embark on the ASP.net project which involves building a pretty powerful search function. The application is very database heavy. Essentially, organisations will be adding a lot of metadata about themselves in the form of multi-selects, free text boxes etc. which are all stored in SQL 2008.
When it comes to search I'm loath to re-invent the wheel. Normally with a content driven site I'd use a component such as Zoom Search or ASP.net Search engine (http://www.aspnetsearchengine.com/UltimateSearch/Features.aspx)
But I don't think these type of content driven search controls are apppropriate for what I need given the data driven nature of the search.
I'm thinking full text search is the way to go but then I'm thinking I'll probably lose a lot of the bells and whistles I'd typically get with a packaged search module like spelling suggestions, document search, synonyms, ignore words etc.
Are there any good hybrid solutions (paid or free) for .net sites that provides these nice features within a search framework of sorts?
Thanks,
Ed
Lucene is pretty highly regarded across a number of languages. It's in use on some pretty large sites too, i know monster.com use it and their search is pretty extensive.
https://lucene.apache.org/
Edit Found some more resources:
Lucene.Net and SQL Server
SQL Server 2008 Full Text Search (FTS) versus Lucene.NET
http://ifdefined.com/blog/post/Full-Text-Search-in-ASPNET-using-LuceneNET.aspx
open source faceted search / guided navigation for ecommerce sites with .net apis

Is there an ASP.NET full text search system for websites?

We host websites in a shared hosting environment where Microsoft SQL Server full text searching is not allowed. We would love an ASP.NET API that allowed similar functionality to get around this restriction.
We can't easily install software on the shared servers, so the API would have to be written in ASP.NET.
SQL "like" queries are our alternative and they are fast enough (our websites never exceed more than 50Mb of text) but they don't rank results well, have a dictionary, do stemming etc
For this type of circumstance I'd rely on Google and create a proper sitemap. You can integrate google search right into your website too with Google SiteSearch.
If you need more control over full-text search, you can use features of the RDBMS to support this. You don't say which brand of RDBMS you're using. I assume it's likely Microsoft SQL Server if you're using ASP.NET.
See the docs for Full-Text Search at MSDN.
For other brands of RDBMS, see my answer: How best to develop the sql to support Search functionality in a web application?
Lucene is what we were looking for http://incubator.apache.org/lucene.net/

Performing search on SQL Server 2008 database

We have built an ASP.NET application (with C#.net language) and hosted on Windows Server 2003 Operating System.
The database is SQL Server 2008.
Now we need to do a search involving 4 tables and one of the column of table is varchar (2400) and the other columns are of normal lengths (E.g. Varchar(50) etc.). This search gets fired whenever an user enters a keyword in the search box and presses enter key. The number of searchable records in future could be in lakhs.
Would you please let me know the best method of searching these tables?
If would be great if you could provide a reference document or web reference (If needed).
Many Thanks,
Regards,
Venkat
To search text columns you should use Full-text search
More resources:
Understanding SQL Server Full-Text Indexing, SQL Server Full Text Search: Language Features and Full Text Search Step by Step Tutorial.
However it depends on the type of queries you make. Regular search using LIKE can be also acceptable.

Implementing a Search Box using ASP.NET MVC, SQL Server, Entity Framework

I have no experience building a search solution, but I'd like to have a search box within my solution and I don't know where to even begin. Are there cool SQL Server tricks that I can use to make my search solution performant (I'm using a hosted SQL 2008 server) I'd love pointers to a multi-step tutorial that starts me off with a simple query search solution...and then layers on more advanced code and features.
You don't actually say whether you need/want a 'spider' to index your site "as is" (like Google; which is useful if your searchable content on each page comes from many different tables/objects/entities) or whether you just want to query EF using full-text-search-like syntax to return a collection of Entities?
If you are interesting in the 'spider' approach - here's a CodeProject article for a small ASP.NET Search Engine "Searcharoo". It is a web-crawling search engine for small-ish sites (it doesn't use a database at all), so it may not be applicable for your situation.
The code is also at searcharoo.codeplex.com and there are 7 articles on how it works/was built at Searcharoo.net (disclaimer: I wrote them; I hope they are interesting/useful).
If you need to search your database directly, you should probably look into SQL Server 2008's Full Text Search feature (assuming LIKE isn't sophisticated enough for your needs). We used info from this article (free registration) to set-up SQL Full Text Search on a work project... no EF in our solution though.
Also, as you might know StackOverflow is built with ASP.NET MVC - they blogged about some problems with SQL 2008 FTS. There's also some info on SQL FTS versus Lucene.NET (which is another search engine you could research) that might be useful.
You might be interested in reading this.
Read this article:
Create a Site Search Engine in ASP.NET
If you don't have to program an engine yourself you could consider using Google Custom Search Engine. There are couple of articles about this:
Using Google Co-op's Custom Search
Engine
Implementing Search in ASP.NET with Google Custom Search
Also could be useful:
Helping Visitors Search Your Site By Creating an OpenSearch Provider

Resources