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
Modeling and querying topic based updates subscriptions
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
  2 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
 
Maciek  
View profile  
 More options May 7 2012, 2:19 pm
From: Maciek <maciejgr...@gmail.com>
Date: Mon, 7 May 2012 11:19:35 -0700 (PDT)
Local: Mon, May 7 2012 2:19 pm
Subject: Modeling and querying topic based updates subscriptions
Just getting started with RavenDB (evaluating it for a small project
at work). Problem:

A user (subscriber) can subscribe (follow) topics. Updates are
published, each about one or more topics. What we want is an ability
to query for updates for a given subscriber based on his/her followed
topics. This is what I came up with:

class Subscriber
{
   public string Id { get; set;}
   public string[] FollowedTopics { get; set; }

}

class Update
{
   public string Id { get; set; }
   public string Title { get; set; }

   // More irrelevant properties

   public string[] Topics { get; set; }

}

Now I really don't know how to query this efficiently. MultiMap index?
Is the schema ok for the problem? Other suggestions?

Thanks,
Maciek


 
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 May 7 2012, 2:29 pm
From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Mon, 7 May 2012 21:29:33 +0300
Local: Mon, May 7 2012 2:29 pm
Subject: Re: [RavenDB] Modeling and querying topic based updates subscriptions

session.Query<Update>().Where(x=>x.Topics.Any(x=>x.In(user. FollowedTopics
 )).toList();

Should work


 
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 »