From: "Oren Eini (Ayende Rahien)" <aye...@ayende.com>
Date: Fri, 11 May 2012 10:53:56 +0100
Local: Fri, May 11 2012 5:53 am
Subject: Re: [RavenDB] Struggling with complex index
Oh, I see, I was confused because I thought CandidateId and ClientId where
AddMap<VacancyApplication>(applications => from a in applications
AddMap<Vacancy>(vacancies => from v in vacancies
});
Reduce = results => from result in results
On Fri, May 11, 2012 at 10:38 AM, Ryan Heath <ryan.q.he...@gmail.com> wrote:
> Oren, > This assumes ClientId within the application document.
> // Ryan
> On Fri, May 11, 2012 at 10:42 AM, Oren Eini (Ayende Rahien)
> > Map = applications => from a in applications
> > On Thu, May 10, 2012 at 11:18 PM, Ben <b...@planetcloud.co.uk> wrote:
> >> It may be that I'm trying to achieve too much with one index. Here are
> >> clients/1
> >> vacancies/2
> >> candidates/1
> >> candidates/2
> >> vacancyapplications/3
> >> vacancyapplications/4
> >> You can see that:
> >> Vacancy holds a reference to Client.
> >> Originally I wanted to:
> >> GET ALL VACANCY APPLICATIONS THAT ARE UNAPPROVED
> >> I want the following information:
> >> ApplicationId
> >> Originally I was doing this with a regular index on State (since this
> >> public class VacancyApplications_Summary :
> >> TransformResults = (store, results) => from result in
> >> }
> >> The problem came when I needed to answer the following:
> >> GET ME ALL VACANCIES FOR CLIENT 1
> >> Of course if I try and query on ClientId I get:
> >> System.ArgumentException: The field 'ClientId' is not indexed, cannot
> >> because quite rightly, I am not indexing ClientId.
> >> So I figured that maybe a multi map index is the way to go for this,
> >> AddMap<VacancyApplication>(applications => from a in
> >> AddMap<Vacancy>(vacancies => from v in vacancies
> >> The thing is, I'm not sure how to group / reduce these results.
> >> With the above documents I would end up 2 VacancyApplications and 1
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.
| ||||||||||||||