2012-11-11 1 views
0

내 원래 질문은 여기에서 찾을 수 있습니다 : RavenDB Index Query QuestionRavenHQ 인덱스 쿼리 반환 (500) 내부 서버 오류가

내가 가지고 이제 다음 인덱스를 사용하여 훌륭한 작업 :

public class JobsQueuedListCurrent : AbstractIndexCreationTask<AppointmentReminder, JobsQueuedListCurrent.IndexResult> 
{ 
    public class IndexResult 
    { 
     public int Id { get; set; } 
     public DateTime AppointmentDateTime { get; set; } 
     public ReminderStatus ReminderStatus { get; set; } 
     public DateTime JobDateTime { get; set; } 
     public JobStatus JobStatus { get; set; } 
    } 

    public JobsQueuedListCurrent() 
    { 


     Map = appointmentreminders => from appointmentreminder in appointmentreminders 
             from job in appointmentreminder.NotificationJobs 
             where (appointmentreminder.ReminderStatus != ReminderStatus.Confirmed) 

             select new 
             { 
              Id = appointmentreminder.Id, 
              AppointmentDateTime = appointmentreminder.AppointmentDateTime, 
              ReminderStatus = appointmentreminder.ReminderStatus, 
              JobDateTime = appointmentreminder.AppointmentDateTime.AddDays(job.DaysOffset), 
              JobStatus = job.JobStatus 
             }; 

     Store(x => x.AppointmentDateTime, FieldStorage.Yes); 
     Store(x => x.ReminderStatus, FieldStorage.Yes); 
     Store(x => x.JobDateTime, FieldStorage.Yes); 
     Store(x => x.JobStatus, FieldStorage.Yes); 

    } 
} 

내가에서 내 코드를 이동 AppHarbor 및 RavenHQ에 대한 내 로컬 컴퓨터. Appharbor와 RavenHQ에서 일반적인 데이터를 연결하고 쿼리 할 수 ​​있습니다. 내 컨트롤러 보이는 같은 : 내가 추가 할 때, 잘 작동

public ActionResult GetJobsQueuedListCurrent() 
    { 
     var jobsqueuedlist = RavenSession.Query<JobsQueuedListCurrent.IndexResult, JobsQueuedListCurrent>() 
      .OrderBy(x => x.AppointmentDateTime) 
      .As<AppointmentReminder>() 
      .Take(20) 
      .ToList(); 

     return View("List", jobsqueuedlist); 

    } 

절 경우 다음

.Where(x => (x.JobDateTime <= DateTime.Now)) 

그래서 컨트롤러가 보이는 것을 같은 : 이것은 지금 결과

public ActionResult GetJobsQueuedListCurrent() 
    { 
     var jobsqueuedlist = RavenSession.Query<JobsQueuedListCurrent.IndexResult, JobsQueuedListCurrent>() 
      .Where(x => (x.JobDateTime <= DateTime.Now)) 
      .OrderBy(x => x.AppointmentDateTime) 
      .As<AppointmentReminder>() 
      .Take(20) 
      .ToList(); 

     return View("List", jobsqueuedlist); 

    } 

오류 (500) : 내부 서버 오류, 출력의 pastebin에 대한 링크는 다음과 같습니다.

Pastebin

Where 절에서 datetime을 사용하도록 쿼리를 허용하려면 어떻게해야합니까? BTW 나는 내 클라이언트 (1.2.2139-Unstable)에서 RavenHQ와 대화하기 위해 최신의 불안정한 것을 사용하고 있습니다. 감사.

답변

0

1.0 클라이언트와 통신하기 위해 1.2 클라이언트를 사용하고 있습니다.

+0

맞아요, 더 구체적인 내용으로 제 질문을하겠습니다. – mcbowes

관련 문제