Querying asynchronously a sharded dataset with facet

29 views
Skip to first unread message

Michael

unread,
Jun 25, 2015, 2:59:30 AM6/25/15
to rav...@googlegroups.com
Hello,

I'm trying to convert some code with a ShardedDocumentStore and i have some trouble with the querying with facet.

When I do my query with synchronous session, it work fine.

   
using (var session = Store.Value.OpenSession())
{
   
var query = session.Query<RavenJObject>("Raven/DocumentsByEntityName").Where(x => (string)x.Tag == "Resources");

   
var countByCollection =  query.ToFacets(new [] {new Facet {Name = "Type"} });
}



But when I tried to do the same, but with an asynchronous conexion i have this error : "The async sharded document store doesn't support synchronous operations"

My code :

using (var session =  Store.Value.OpenAsyncSession())
{
     
var query = await session.Query<RavenJObject>("Raven/DocumentsByEntityName").Where(x => (string) x.Tag  == "Resources");

     
var countByCollection =  query.ToFacetsAsync(new [] {new Facet {Name = "Type"} });
 
}



I guess I did a stupide mistake, but I'm a bit stuck with this.



Thanks in advance for your answers,

Michaël
Message has been deleted

Oren Eini (Ayende Rahien)

unread,
Jun 25, 2015, 5:15:24 AM6/25/15
to ravendb

We fixed some async sharding issues after 3660.

On Jun 25, 2015 11:00, "Michaël Di Marco" <m.dim...@gmail.com> wrote:
I use the build 3660, I'll try to update to the latest version

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael

unread,
Jun 25, 2015, 7:13:40 AM6/25/15
to rav...@googlegroups.com
Hi,

Thanks for your answer,

I tried to update my client and server to 3690 and then to 3714 and I have the same issue.

I made a falling test with the client 3714.
RavenDB_3714.cs

Oren Eini (Ayende Rahien)

unread,
Jun 25, 2015, 8:03:29 AM6/25/15
to ravendb

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
Reply all
Reply to author
Forward
0 new messages