Select all records of a type <p>I'm trying to get all records of specific type from RavenDB with C#.</p> <p>When I'm using Lucene:</p> <pre><code> var serviceTraces = session.Advanced.LuceneQuery&lt;ServiceTrace&gt;("IDLoadDateIndex").Take(50); </code></pre> <p>I'm getting the results in: </p> <p>serviceTraces.QueryResult.Results</p> <p>When I'm not using Lucene:</p> <pre><code>var serviceTraces = session.Query&lt;ServiceTrace&gt;("IDLoadDateIndex").Take(50); </code></pre> <p>I'm not getting any results and an exception is thrown when trying to perform "ToList()" on "serviceTraces" object.</p> <p>Why is that ?</p> <p><strong>UPDATE:</strong></p> <p>ServiceTrace class:</p> <pre><code>public class ServiceTrace { public ServiceTrace(ServiceDeployment sd) { // TODO: Complete member initialization this.ServiceDeploymentID = sd.Id; } public string Id { get; set; } public string TransactionID { get; set; } public string ParentTransactionID { get; set; } public string RequestID { get; set; } public int ApplicationCode { get; set; } public int InstituteCode { get; set; } public string ServiceDeploymentID { get; set; } public string UserHostAddress { get; set; } public string UserAgent { get; set; } public string Username { get; set; } public DateTime RequestDateTime { get; set; } public DateTime ResponseDateTime { get; set; } public string RequestBody { get; set; } public string ResponseBody { get; set; } public string Key1Value { get; set; } public string Key2Value { get; set; } public string Key3Value { get; set; } public string Key4Value { get; set; } public string Key5Value { get; set; } public int StatusCode { get; set; } public string StatusDescription { get; set; } public string FullExceptionText { get; set; } public DateTime LoadDate { get; set; } public DateTime ActivationDateTime { get; set; } public string HostAddress { get; set; } public string BpmID { get; set; } public DateTime PreProcessDatetime { get; set; } public string DestHostAddress { get; set; } public string ArchivePath { get; set; } public string BTInstanceID { get; set; } public string Temp1 { get; set; } public string ExternalComponentDuration { get; set; } public string SQLIdentity { get; set; } public string ExceptionCode { get; set; } public string CertificateID { get; set; } public string ExternalComponentType { get; set; } public string ActivationID { get; set; } } </code></pre> <p>IDLoadDateIndex:</p> <pre><code>public class IDLoadDateIndex : AbstractIndexCreationTask&lt;ServiceTrace&gt; { public IDLoadDateIndex() { Map = serviceTrace =&gt; from st in serviceTrace select new { LoadDate = st.LoadDate }; Index(x =&gt; x.LoadDate, FieldIndexing.Analyzed); } } </code></pre>