Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem getting Pictures
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dredme  
View profile  
 More options Jun 16 2012, 4:21 am
From: dredme <dor.r...@gmail.com>
Date: Sat, 16 Jun 2012 01:21:01 -0700 (PDT)
Local: Sat, Jun 16 2012 4:21 am
Subject: Problem getting Pictures

Hi,
I am trying to run this query:

RavenSession.Query<Picture>().Customize(x =>
x.WaitForNonStaleResults()).Where(c => c.ParentDocumentId == id &&
c.IsOfficial.Value).Select(c => new Picture

{

Name = c.Name,

Title = c.Title,

Url = c.Url,

Id = c.Id,

Description = c.Description,

IsMain = c.IsMain,

}).ToList();

But I get the following error:
*Url:
"/indexes/dynamic/Pictures?query=ParentDocumentId%253A7041%2520AND%2520IsOf ficial.Value%253Atrue&start=0&pageSize=128&aggregation=None&fetch=Name&fetc h=Title&fetch=Url&fetch=__document_id&fetch=Description&fetch=IsMain"
Index: "Temp/Pictures/ByIsOfficial_ValueAndParentDocumentId"

Index Temp/Pictures/ByIsOfficial_ValueAndParentDocumentId is invalid, out
of 258 indexing attempts, 258 has failed.
Error rate of 100% exceeds allowed 15% error rate*

Can anyone tell me what I'm doing wrong?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 16 2012, 4:53 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Sat, 16 Jun 2012 11:53:31 +0300
Local: Sat, Jun 16 2012 4:53 am
Subject: Re: [RavenDB] Problem getting Pictures

Go into the studio and look at the errors.
Somehow, you have an index that throws errors, which is really strange.

What does it shows?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dredme  
View profile  
 More options Jun 16 2012, 7:10 am
From: dredme <dor.r...@gmail.com>
Date: Sat, 16 Jun 2012 04:10:37 -0700 (PDT)
Local: Sat, Jun 16 2012 7:10 am
Subject: Re: [RavenDB] Problem getting Pictures

Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'bool' does not
contain a definition for 'Value'
   at CallSite.Target(Closure , CallSite , Object )
   at
Index_Temp_2fPictures_2fByIsOfficial_ValueAndParentDocumentId.<.ctor>b__b(O bject
doc)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at Raven.Database.Indexing.RobustEnumerator.MoveNext(IEnumerator en,
StatefulEnumerableWrapper`1 innerEnumerator) in
c:\Builds\RavenDB-Stable\Raven.Database\Indexing\RobustEnumerator.cs:line 84

בתאריך יום שבת, 16 ביוני 2012 11:53:31 UTC+3, מאת Oren Eini:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 16 2012, 7:28 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Sat, 16 Jun 2012 14:28:04 +0300
Local: Sat, Jun 16 2012 7:28 am
Subject: Re: [RavenDB] Problem getting Pictures

Hm,
What does the index looks like?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dredme  
View profile  
 More options Jun 16 2012, 11:47 am
From: dredme <dor.r...@gmail.com>
Date: Sat, 16 Jun 2012 08:47:23 -0700 (PDT)
Local: Sat, Jun 16 2012 11:47 am
Subject: Re: [RavenDB] Problem getting Pictures

I wrote a query in the first post above, when I run it I get this error
about RavenDB didn't succeed creating the index for this query.
I'm using build #888

The paramaters ParectDocumentId is int and the IsOfficial parameter is a
nullable bool

בתאריך יום שבת, 16 ביוני 2012 14:28:04 UTC+3, מאת Oren Eini:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Justin A  
View profile  
 More options Jun 16 2012, 8:08 pm
From: Justin A <jus...@adler.com.au>
Date: Sat, 16 Jun 2012 17:08:19 -0700 (PDT)
Local: Sat, Jun 16 2012 8:08 pm
Subject: Re: [RavenDB] Problem getting Pictures

I'm no pro at this, but maybe convert the IsOfficial from bool? to bool.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 17 2012, 3:06 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Sun, 17 Jun 2012 10:06:01 +0300
Local: Sun, Jun 17 2012 3:06 am
Subject: Re: [RavenDB] Problem getting Pictures

Can you show the actual index ?
And a sample document?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dredme  
View profile  
 More options Jun 18 2012, 8:02 am
From: dredme <dor.r...@gmail.com>
Date: Mon, 18 Jun 2012 05:02:57 -0700 (PDT)
Local: Mon, Jun 18 2012 8:02 am
Subject: Re: [RavenDB] Problem getting Pictures

here is the index

from doc in docs.Pictures
select new { ParentDocumentId = doc.ParentDocumentId, IsOfficial_Value =
doc.IsOfficial.Value, IsOfficial = doc.IsOfficial }

and here is a sample document
{
  "Title": null,
  "Filename":
"D:\\uploads\\pictures\\634745902552916022_Hotel_7041_4368107104_71956ab061 .jpg",
  "Url":
"/uploads/pictures/634745902552916022_Hotel_7041_4368107104_71956ab061.jpg" ,
  "MediaType": null,
  "Description": null,
  "ParentDocumentId": 7041,
  "ParentDocumentType": "Hotel",
  "Username": "",
  "IsOfficial": true,
  "IsMain": null,
  "CreatedOn": "2012-06-06T14:37:35.4316102",
  "Name": null,
  "Status": "Published"

}

בתאריך יום ראשון, 17 ביוני 2012 10:06:01 UTC+3, מאת Oren Eini:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 18 2012, 8:13 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 18 Jun 2012 15:13:57 +0300
Local: Mon, Jun 18 2012 8:13 am
Subject: Re: [RavenDB] Problem getting Pictures

You have this:
, IsOfficial_Value = doc.IsOfficial.Value

The problem is that this is a boolean property, and bool doesn't have a
Value property.
I assume it is a nullable boolean in your code?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dredme  
View profile  
 More options Jun 18 2012, 8:28 am
From: dredme <dor.r...@gmail.com>
Date: Mon, 18 Jun 2012 05:28:38 -0700 (PDT)
Local: Mon, Jun 18 2012 8:28 am
Subject: Re: [RavenDB] Problem getting Pictures

yes it is

בתאריך יום שני, 18 ביוני 2012 15:13:57 UTC+3, מאת Oren Eini:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Oren Eini (Ayende Rahien)  
View profile  
 More options Jun 18 2012, 8:37 am
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 18 Jun 2012 15:37:45 +0300
Local: Mon, Jun 18 2012 8:37 am
Subject: Re: [RavenDB] Problem getting Pictures

Nullable bool isn't supported right now.
Try doing the query like this (just c.IsOfficial, not c.IsOfficial.Value)

RavenSession.Query<Picture>().Customize(x =>
x.WaitForNonStaleResults()).Where(c
=> c.ParentDocumentId == id && c.IsOfficial).Select(c => new Picture

{

Name = c.Name,

Title = c.Title,

Url = c.Url,

Id = c.Id,

Description = c.Description,

IsMain = c.IsMain,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dredme  
View profile  
 More options Jun 18 2012, 10:25 am
From: dredme <dor.r...@gmail.com>
Date: Mon, 18 Jun 2012 07:25:00 -0700 (PDT)
Subject: Re: [RavenDB] Problem getting Pictures

I have to change it to bool and not (bool?) in order for it to compile, but
thats ok, it runs good that way.

בתאריך יום שני, 18 ביוני 2012 15:37:45 UTC+3, מאת Oren Eini:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »