Open source LINQ search engine for website

I want to add a search engine to my site. I want it to process boolean queries and give me a list of results in order or best match. I need it to be able to work with LINQ because I want to add additional where clauses for the final query that is being run. I'm looking for the best .NET open source search engine that works with LINQ. I like lucene.net, but the problem is that LINQ (LINQ to Lucene) interface hasn't been updated since 2008. Are there any good options out there?

+2


a source to share


2 answers


You can try and use Microsoft's free Search Server Express. It is available in beta for the 2010 version but will be released soon. The SharePoint (Search) API is very similar to SQL, so you can add additional where clauses.

It's not linq or open source, but it's free and might work for you. I looked at the lucene linq api a bit and came to the same conclusion you have. It is not being updated and Lucene is still working.

Another option is to create your own Lucene Linq provider, but this will take some work.

Documentation for the FullTextSqlQuery class . (old versions of docs with sample here )



Here is a code snippet to show what it looks like:

FullTextSqlQuery fullTextSqlQuery = new FullTextSqlQuery(site)
fullTextSqlQuery.QueryText = String.Format("SELECT Title, SiteName, Path FROM Scope() WHERE \"scope\"='All Sites' AND CONTAINS('\"{0}\"')", searchPhrase),

      

and you can add more to the WHERE part of the query.

+1


a source


I decided to use SQL Server Full Text Indexing. It's not as complete as lucene.net, but for my requirements it does its job just fine.



0


a source







All Articles