Skip to content

Commit a3ed665

Browse files
Ihar YakimushIhar Yakimush
authored andcommitted
update readme
1 parent 3369c68 commit a3ed665

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ IQueryable<Product> solrLinq = solr.AsQueryable(setup =>
109109
new {
110110
p.Id,
111111
p.Categories,
112-
Qwe = Math.Pow(2,2), // will be evaluated locally
112+
Qwe = Math.Pow(2,2), // evaluated locally
113+
Next = new { p.Id, SomeConst="qwe" } // evaluated locally after selecting required info from solr
113114
ValStr = SolrExpr.Transformers.Value("qwe"), // value transformer evaluated in solr
114115
Score= SolrExpr.Fields.Score() // score pseudo field evaluated in solr
115116
}).OrderBy(arg => arg.Score) // allowed to use expressions evaluated in solr for ordering
@@ -118,7 +119,13 @@ IQueryable<Product> solrLinq = solr.AsQueryable(setup =>
118119
### Select
119120
- Existing type by member initialization
120121
```
121-
var result = solrLinq.Select(p => new Product2 {Id = p.Id, Price = p.Price, Categories = p.Categories, Qwe = Math.Pow(2, 2)}).ToArray();
122+
var result = solrLinq.Select(p =>
123+
new Product2 {
124+
Id = p.Id,
125+
Price = p.Price + 1,
126+
Categories = p.Categories,
127+
Qwe = Math.Pow(2, 2)
128+
}).ToArray();
122129
```
123130
- Combine Select with other methods
124131
```

0 commit comments

Comments
 (0)