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:
James Crowley <james.crow... @gmail.com>
Date: Sat, 30 Jun 2012 11:34:06 +0100
Local: Sat, Jun 30 2012 6:34 am
Subject: Facets and collections
If I have the following:
Event { type:"X", tags: ["tag1","tag2"] }
and an index like this:
from event in doc.events
from tag in event.Tags
select {
event.type
tag
}
using faceted search, I'm getting a count of 2 for type: "x" facet ?
Is this expected? I'm using .As<Event>() on the query, which gives me
distinct events in ToList(), but not for ToFacets(). How do I get it
to count only distinct documents?
Thanks!
James
--
---
James Crowley
CTO, FundApps - a new generation in financial services software -
http://www.fundapps.co/
Founder, developerFusion - the global developer community -
http://www.developerfusion.com/
linkedin: http://linkedin.com/in/jamescrowley
twitter: http://twitter.com/jamescrowley
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Matt Warren <mattd... @gmail.com>
Date: Sat, 30 Jun 2012 09:02:36 -0700 (PDT)
Local: Sat, Jun 30 2012 12:02 pm
Subject: Re: Facets and collections
inline
On Saturday, 30 June 2012 11:34:06 UTC+1, jamescrowley wrote:
> If I have the following:
> Event { type:"X", tags: ["tag1","tag2"] }
> and an index like this:
> from event in doc.events > from tag in event.Tags > select { > event.type > tag > }
> using faceted search, I'm getting a count of 2 for type: "x" facet ? > Is this expected?
Yeah that's expected, faceted search just takes all the terms in the index
and gives you the count of how many times each term occurs
> I'm using .As<Event>() on the query, which gives me distinct events in > ToList(), but not for ToFacets().
How do I get it to count only distinct documents?
Facet search doesn't really make sense alongside As, it works in a
different way from other queries.
If you want count of distinct events, you can change your index to this, (it should work)
from event in doc.events select { event.type event.Tags.SelectMany(t => t) }
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Oren Eini (Ayende Rahien)" <aye... @ayende.com>
Date: Sat, 30 Jun 2012 20:03:43 +0300
Local: Sat, Jun 30 2012 1:03 pm
Subject: Re: [RavenDB] Re: Facets and collections
Almost, you need:
from event in doc.events
select {
event.type
tag = event.Tags
}
On Sat, Jun 30, 2012 at 7:02 PM, Matt Warren <mattd
... @gmail.com> wrote:
> inline
> On Saturday, 30 June 2012 11:34:06 UTC+1, jamescrowley wrote:
>> If I have the following:
>> Event { type:"X", tags: ["tag1","tag2"] }
>> and an index like this:
>> from event in doc.events
>> from tag in event.Tags
>> select {
>> event.type
>> tag
>> }
>> using faceted search, I'm getting a count of 2 for type: "x" facet ?
>> Is this expected?
> Yeah that's expected, faceted search just takes all the terms in the index
> and gives you the count of how many times each term occurs
>> I'm using .As<Event>() on the query, which gives me distinct events in
>> ToList(), but not for ToFacets().
> How do I get it to count only distinct documents?
> Facet search doesn't really make sense alongside As, it works in a
> different way from other queries.
> If you want count of distinct events, you can change your index to this,
> (it should work)
> from event in doc.events
> select {
> event.type
> event.Tags.SelectMany(t => t)
> }
>> Thanks!
>> James
> ---
>> James Crowley
>> CTO, FundApps - a new generation in financial services software -
>> http://www.fundapps.co/
>> Founder, developerFusion - the global developer community -
>> http://www.developerfusion.**com/ <http://www.developerfusion.com/ >
>> linkedin: http://linkedin.com/in/**jamescrowley <http://linkedin.com/in/jamescrowley >
>> twitter: http://twitter.com/**jamescrowley <http://twitter.com/jamescrowley >
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
James Crowley <james.crow... @gmail.com>
Date: Mon, 2 Jul 2012 08:34:58 +0100
Local: Mon, Jul 2 2012 3:34 am
Subject: Re: [RavenDB] Re: Facets and collections
Thanks - I just skipped right past that option assuming it wouldn't
work! Perhaps stick in a collection to the example on
http://ravendb.net/docs/client-api/faceted-search ?
J
On 30 June 2012 18:03, Oren Eini (Ayende Rahien) <aye... @ayende.com> wrote:
> Almost, you need:
> from event in doc.events
> select {
> event.type
> tag = event.Tags
> }
> On Sat, Jun 30, 2012 at 7:02 PM, Matt Warren <mattd... @gmail.com> wrote:
>> inline
>> On Saturday, 30 June 2012 11:34:06 UTC+1, jamescrowley wrote:
>>> If I have the following:
>>> Event { type:"X", tags: ["tag1","tag2"] }
>>> and an index like this:
>>> from event in doc.events
>>> from tag in event.Tags
>>> select {
>>> event.type
>>> tag
>>> }
>>> using faceted search, I'm getting a count of 2 for type: "x" facet ?
>>> Is this expected?
>> Yeah that's expected, faceted search just takes all the terms in the index
>> and gives you the count of how many times each term occurs
>>> I'm using .As<Event>() on the query, which gives me distinct events in
>>> ToList(), but not for ToFacets().
>>> How do I get it to count only distinct documents?
>> Facet search doesn't really make sense alongside As, it works in a
>> different way from other queries.
>> If you want count of distinct events, you can change your index to this,
>> (it should work)
>> from event in doc.events
>> select {
>> event.type
>> event.Tags.SelectMany(t => t)
>> }
>>> Thanks!
>>> James
>>> ---
>>> James Crowley
>>> CTO, FundApps - a new generation in financial services software -
>>> http://www.fundapps.co/
>>> Founder, developerFusion - the global developer community -
>>> http://www.developerfusion.com/
>>> linkedin: http://linkedin.com/in/jamescrowley
>>> twitter: http://twitter.com/jamescrowley
--
---
James Crowley
CTO, FundApps - a new generation in financial services software -
http://www.fundapps.co/
Founder, developerFusion - the global developer community -
http://www.developerfusion.com/
linkedin: http://linkedin.com/in/jamescrowley
twitter: http://twitter.com/jamescrowley
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Oren Eini (Ayende Rahien)" <aye... @ayende.com>
Date: Mon, 2 Jul 2012 12:12:44 +0300
Local: Mon, Jul 2 2012 5:12 am
Subject: Re: [RavenDB] Re: Facets and collections
Matt,
Can you add that doc?
On Mon, Jul 2, 2012 at 10:34 AM, James Crowley <james.crow... @gmail.com>wrote:
> Thanks - I just skipped right past that option assuming it wouldn't
> work! Perhaps stick in a collection to the example on
>
http://ravendb.net/docs/client-api/faceted-search ?
> J
> On 30 June 2012 18:03, Oren Eini (Ayende Rahien) <aye... @ayende.com>
> wrote:
> > Almost, you need:
> > from event in doc.events
> > select {
> > event.type
> > tag = event.Tags
> > }
> > On Sat, Jun 30, 2012 at 7:02 PM, Matt Warren <mattd... @gmail.com> wrote:
> >> inline
> >> On Saturday, 30 June 2012 11:34:06 UTC+1, jamescrowley wrote:
> >>> If I have the following:
> >>> Event { type:"X", tags: ["tag1","tag2"] }
> >>> and an index like this:
> >>> from event in doc.events
> >>> from tag in event.Tags
> >>> select {
> >>> event.type
> >>> tag
> >>> }
> >>> using faceted search, I'm getting a count of 2 for type: "x" facet ?
> >>> Is this expected?
> >> Yeah that's expected, faceted search just takes all the terms in the
> index
> >> and gives you the count of how many times each term occurs
> >>> I'm using .As<Event>() on the query, which gives me distinct events in
> >>> ToList(), but not for ToFacets().
> >>> How do I get it to count only distinct documents?
> >> Facet search doesn't really make sense alongside As, it works in a
> >> different way from other queries.
> >> If you want count of distinct events, you can change your index to this,
> >> (it should work)
> >> from event in doc.events
> >> select {
> >> event.type
> >> event.Tags.SelectMany(t => t)
> >> }
> >>> Thanks!
> >>> James
> >>> ---
> >>> James Crowley
> >>> CTO, FundApps - a new generation in financial services software -
> >>> http://www.fundapps.co/
> >>> Founder, developerFusion - the global developer community -
> >>> http://www.developerfusion.com/
> >>> linkedin: http://linkedin.com/in/jamescrowley
> >>> twitter: http://twitter.com/jamescrowley
> --
> ---
> James Crowley
> CTO, FundApps - a new generation in financial services software -
> http://www.fundapps.co/
> Founder, developerFusion - the global developer community -
> http://www.developerfusion.com/
> linkedin: http://linkedin.com/in/jamescrowley
> twitter: http://twitter.com/jamescrowley
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Matt Warren <mattd... @gmail.com>
Date: Mon, 2 Jul 2012 02:27:20 -0700 (PDT)
Local: Mon, Jul 2 2012 5:27 am
Subject: Re: [RavenDB] Re: Facets and collections
Yeah I'll update it and send a pull-request sometime in the next few days
On Monday, 2 July 2012 10:12:44 UTC+1, Oren Eini wrote:
> Matt, > Can you add that doc?
> On Mon, Jul 2, 2012 at 10:34 AM, James Crowley <james.crow... @gmail.com>wrote:
>> Thanks - I just skipped right past that option assuming it wouldn't >> work! Perhaps stick in a collection to the example on >> http://ravendb.net/docs/client-api/faceted-search ?
>> J
>> On 30 June 2012 18:03, Oren Eini (Ayende Rahien) <aye... @ayende.com> >> wrote: >> > Almost, you need:
>> > from event in doc.events >> > select { >> > event.type >> > tag = event.Tags
>> > }
>> > On Sat, Jun 30, 2012 at 7:02 PM, Matt Warren <mattd... @gmail.com> >> wrote:
>> >> inline
>> >> On Saturday, 30 June 2012 11:34:06 UTC+1, jamescrowley wrote:
>> >>> If I have the following:
>> >>> Event { type:"X", tags: ["tag1","tag2"] }
>> >>> and an index like this:
>> >>> from event in doc.events >> >>> from tag in event.Tags >> >>> select { >> >>> event.type >> >>> tag >> >>> }
>> >>> using faceted search, I'm getting a count of 2 for type: "x" facet ? >> >>> Is this expected?
>> >> Yeah that's expected, faceted search just takes all the terms in the >> index >> >> and gives you the count of how many times each term occurs
>> >>> I'm using .As<Event>() on the query, which gives me distinct events in >> >>> ToList(), but not for ToFacets().
>> >>> How do I get it to count only distinct documents?
>> >> Facet search doesn't really make sense alongside As, it works in a >> >> different way from other queries.
>> >> If you want count of distinct events, you can change your index to >> this, >> >> (it should work)
>> >> from event in doc.events >> >> select { >> >> event.type >> >> event.Tags.SelectMany(t => t) >> >> }
>> >>> Thanks!
>> >>> James
>> >>> --- >> >>> James Crowley >> >>> CTO, FundApps - a new generation in financial services software - >> >>> http://www.fundapps.co/ >> >>> Founder, developerFusion - the global developer community - >> >>> http://www.developerfusion.com/
>> >>> linkedin: http://linkedin.com/in/jamescrowley >> >>> twitter: http://twitter.com/jamescrowley
>> --
>> --- >> James Crowley >> CTO, FundApps - a new generation in financial services software - >> http://www.fundapps.co/ >> Founder, developerFusion - the global developer community - >> http://www.developerfusion.com/
>> linkedin: http://linkedin.com/in/jamescrowley >> twitter: http://twitter.com/jamescrowley
You must
Sign in before you can post messages.
You do not have the permission required to post.