Last active
May 31, 2017 21:15
-
-
Save Bishbulb/e52976a5e14ae9af7dfc3254af0b4f67 to your computer and use it in GitHub Desktop.
An example of a RavenDB index that uses a custom analyzer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyTestIndex : AbstractIndexCreationTask<BlogPost> | |
{ | |
public MyTestIndex() | |
{ | |
Map = posts => from post in posts | |
select new | |
{ | |
post.Tags, | |
post.Content | |
}; | |
Analyzers.Add(x => x.Content, typeof(MyLowercaseAnalyzer).FullName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment