There reason I ask is that I had been using the strongly typed version, but ran into the issue of it not being flexible enough, so I switched over to the AdvancedQuery.Luncene which did provide the flexibility but at a loss in performance. I was thinking that the lower level query engine would be faster than than it counter-part or at least equivalent. Can someone shed some light on this?
Thank you,
Stephen
watch = Stopwatch.StartNew();
result = s.Query<Product>()
.Statistics(out stats)
.Where(x => x.HasPicture == true)
.ToArray();
watch.Stop();
Time elapsed to execute query for HasPicture == true 975
Total number of products found: 412352
watch = Stopwatch.StartNew();
result = s.Advanced.LuceneQuery<Product>("Products_Index")
.Statistics(out stats)
.Where("HasPicture:(True)")
.ToArray()
;
watch.Stop();
Time elapsed to execute query with Lucene 7065
Total number of products found: 412352
Thanks to Itamar.
The problem was the Where clause, when using the LuceneQuery use WhereEquals.