2. Alonso Robles
S Principal Consultant @ Headspring
S Blog: http://alonsorobles.com
S Linked In: http://linkedin.com/in/alonsorobles
S Twitter: @alonsorobles
3. Central Texas
GiveCamp
September 28-30, 2012
Interested in Participating?
Developer – Make software. Have fun. Do
good!
Non-Profit – What can we build for you?
Sponsor – Help make the even successful.
More Info:
http://ctxgivecamp.org
12. Lucene
S Mature, De Facto Standard Information Retrieval Library
S Scalable, High Performance Indexing
S Powerful, Accurate and Efficient Search Algorithms
S Originally Written in Java and Ported to Many Languages
S Used by Apple, IBM, Linked In and many more…
13. Types of Indexes
S Temporary Dynamic Index
S Created on the fly to service a query when no existing index
can be used
S Permanent Dynamic Index
S Promoted when a temporary index is used a lot
S Static Index
S User defined
15. Reasons for Static Indexes
S Index Creation is Expensive
S Additional Functionality
S Custom Sorting
S Boosting
S Full-Text Search
S Live Projections
S Spatial Search
27. More Info
S Official Raven Website: http://ravendb.net
S Oren’s Blog: http://ayende.com
S Google Group: http://groups.google.com/group/ravendb/
S My Blog: http://alonsorobles.com
S Local Training: http://headspring.com
Notes de l'éditeur
Every index is required to have a name and a Map function. The Map function is the way for us to tell RavenDB how to find the data we are interested in, and what fields we are going to be searching on. The Map function is written in LINQ, just like you'd write a simple query
The Reduce function is optional, and is written and executed just like the Map function, but this time on the results of the Map function. This is actually a second indexing pass, which allows us to perform aggregation operations quite cheaply, directly from the index.
Sorting by default is performed lexographically.
FieldStorageNo (default) – Does not store the value of the field in the indexYes – Stores the value of field Compress – Compresses the value of the field (good for long text or binary fields)FieldInexing OptionsAnalyzed – Standard analysis good for full text search or text fields (breaks up text into terms and performs stemming analysis)Default – LowerCaseKeywordAnalyzer (stores the entire field as a single term for exact matching)No – Field is not indexed thus cannot be searched. But it can still be accessed assuming it was stored.NotAnalyzed – Indexes the field without performing analysis. This is good for unique ids like product numbers (UPC, ISBN, MPN)
Using the Live Projections feature, you have more control over what to load into the result entity, and since it returns a projection of the original entity, you also get the chance to filter out properties you do not need.