Examine’s Fluent Search API – Elevator Pitch

by Aaron Powell 31. March 2010 12:08

I realised that with my blog post about Examine it was fairly in-depth and a lot of people were probably bored before they got to the good bits about how easy searching can be.
So I decided that a smaller, more concise post was in order.

What?

The Fluent Search API is a chainable (like jQuery) API for building complex searches for a data source, in this case Umbraco. It doesn’t require you to know any “search language”, it just works via standard .NET style method calls, with intellisense to help guide you along the way.

How?

This is achieved by combining IQuery methods (search methods) with IBooleanOperation methods (And, Or, Not) to produce something cool. For example:

var query = sc
	.NodeName("umbraco")
	.And()
	.Field("bodyText", "is awesome".Escape())
	.Or()
	.Field("bodyText", "rock".Fuzzy()); 

Examineness can be implemented to do special things to search text, like making it a wild card query, or escaping several terms to have them used as a search sentence.

 

Hopefully this more direct post will engage your attention better and make you want more Examine sexiness.

Categories: .Net | Examine | Umbraco

Comments

8/12/2010 12:15:15 PM #

How to build a search query in Examine

How to build a search query in Examine

FARMCode.org

6/30/2011 2:03:46 AM #

'string' does not contain a definition for 'Escape' and 'string' does not contain a definition for 'Fuzzy' are just two of the errors the above code throws.

Connie DeCinko United States