-
Notifications
You must be signed in to change notification settings - Fork 0
Linq provider to solrnet
allow to query solr in a Linq Syntax: Supporting the following features:
-
Equals: var linqQuery = from doc in solr.AsQueryable() where doc.Name == "aa" select doc;
-
Greater/Smaller Equals var linqQuery = from doc in solr.AsQueryable() where doc.Price >= 1 && doc.Price <= 10 select doc;
-
Not Operator var linqQuery = from doc in solr.AsQueryable() where !(doc.Name == "bb") select doc;
4 DefaultField var linqQuery = from doc in solr.AsQueryable() where doc.DefaultField("aa") select doc;
-
AND / OR var linqQuery = from doc in solr.AsQueryable() where doc.DefaultField("aa") && (doc.Price >= 1 || doc.Price <= 11) select doc;
-
Partial Eval int priceVal = 1; DateTime dt = new DateTime(2011, 1, 1); var linqQuery = from doc in solr.AsQueryable() where (doc.Price >= priceVal || doc.Timestamp >= dt) select doc;
-
Pagination var linqQuery = (from doc in solr.AsQueryable() where (doc.Price >= priceVal || doc.Timestamp >= dt) select doc).Pagination(10,15);
-
Sort var linqQuery = from doc in solr.AsQueryable() where (doc.Price >= priceVal || doc.Timestamp >= dt) orderby doc.Id, doc.Price descending select doc;
-
Boost var linqQuery = from doc in solr.AsQueryable() where (doc.Name == "john").Boost(10) select doc;
-
Collection – Single var linqQuery = from doc in solr.AsQueryable() where doc.Categories.AnyItem() == "cat1" select doc;
-
AdditinalParameters var linqQuery = (from doc in solr.AsQueryable() where (doc.Price >= priceVal || doc.Timestamp >= dt) select doc).AdditinalParameters(new Dictionary<string,string>{{ "queryduration","100"}};
-
dynamic fields var linqQuery = from doc in solr.AsQueryable() where doc.DynamicField("field_1") == "val" select doc;