Documentation
This page contains links to various examples of using SimpleLucene.
It assumes that you have some knowledge of the
Lucene.NET library (see
http://www.aspfree.com/c/a/BrainDump/Working-with-Lucene-dot-Net for a good introduction to Lucene.NET).
These examples make use of the following Product entity and static repository:
public class Product {
public int Id { get; set; }
public string Name { get; set; }
public decimal Price { get; set; }
public DateTime CreatedOn { get; set; }
}
public class ProductRepository {
public static IList<Product> GetProducts() {
return new List<Product> {
new Product { Id = 1, Name = "Football", Price = 12.99M, CreatedOn = new DateTime(2011, 1, 1)},
new Product { Id = 2, Name = "Trainers", Price = 34.99M, CreatedOn = new DateTime(2011, 2, 15)},
new Product { Id = 3, Name = "Laptop", Price = 499.50M, CreatedOn = new DateTime(2010, 12, 28)},
new Product { Id = 4, Name = "DVD", Price = 11.00M, CreatedOn = new DateTime(2010, 11, 5)},
new Product { Id = 5, Name = "Mobile Phone", Price = 134.45M, CreatedOn = new DateTime(2010, 9, 18)}
};
}
}
Indexing
Searching
Maintaining your index