Re: Faceting and multiValued field type

2016-01-19 Thread Erick Erickson
Yes.

What do you mean "how does it work"? The low-level
details or what?

Basically, faceting just... facets. I.e. for each unique
value in the field specified it counts the number of
docs in the result set that have that value.

So if you have a doc with two dates and facet on that
field, say 1/1/2015 and 1/1/2016,
that doc will be counted in each bucket.

Best,
Erick

On Tue, Jan 19, 2016 at 8:48 AM, Steven White  wrote:
> Hi everyone,
>
> Can I use facet on a field type of multiValued?  If so, how does facet work
> with field type of "date" set as multiValued?
>
> Thanks
>
> Steve


Re: Faceting and multiValued field type

2016-01-19 Thread Steven White
My apology for not being clear -- I left out the keyword "range search"
with facet.  Let me try again.

Using DateRangeField field type, if this field is multiValued and I have 3
date values stored for one record, 5 for another, etc., which of those date
values will be used for faceting when I use range-search faceting on this
field?

Don't I have the same issue on other field types when it comes to range
searches?  Such as CurrencyField, or int, float, etc.

-- George

On Tue, Jan 19, 2016 at 1:10 PM, Erick Erickson 
wrote:

> Yes.
>
> What do you mean "how does it work"? The low-level
> details or what?
>
> Basically, faceting just... facets. I.e. for each unique
> value in the field specified it counts the number of
> docs in the result set that have that value.
>
> So if you have a doc with two dates and facet on that
> field, say 1/1/2015 and 1/1/2016,
> that doc will be counted in each bucket.
>
> Best,
> Erick
>
> On Tue, Jan 19, 2016 at 8:48 AM, Steven White 
> wrote:
> > Hi everyone,
> >
> > Can I use facet on a field type of multiValued?  If so, how does facet
> work
> > with field type of "date" set as multiValued?
> >
> > Thanks
> >
> > Steve
>


Re: Faceting and multiValued field type

2016-01-19 Thread Erick Erickson
bq: which of those date values will be used for faceting when I
use range-search faceting on this field?

All of them. Which values match in a multiValued field, range
query or not, have no bearing on the facet counts. Faceting
essentially says "take all the docs that match the query and,
for each unique value in the field being faceted upon, tell
me how many of the docs have that value."

So I have docs with a multivalued field f1 like this
doc1 f1=>a,b,c,d
doc2 f1=>c,d,e,f

q=f1:[b TO c]

Both docs are hits, and you get back facets like
a-1
b-1
c-2
d-2
e-1
f-1

q=*:*, q=f1:c would give the same facet counts.

Best,
Erick

On Tue, Jan 19, 2016 at 11:28 AM, Steven White  wrote:
> My apology for not being clear -- I left out the keyword "range search"
> with facet.  Let me try again.
>
> Using DateRangeField field type, if this field is multiValued and I have 3
> date values stored for one record, 5 for another, etc., which of those date
> values will be used for faceting when I use range-search faceting on this
> field?
>
> Don't I have the same issue on other field types when it comes to range
> searches?  Such as CurrencyField, or int, float, etc.
>
> -- George
>
> On Tue, Jan 19, 2016 at 1:10 PM, Erick Erickson 
> wrote:
>
>> Yes.
>>
>> What do you mean "how does it work"? The low-level
>> details or what?
>>
>> Basically, faceting just... facets. I.e. for each unique
>> value in the field specified it counts the number of
>> docs in the result set that have that value.
>>
>> So if you have a doc with two dates and facet on that
>> field, say 1/1/2015 and 1/1/2016,
>> that doc will be counted in each bucket.
>>
>> Best,
>> Erick
>>
>> On Tue, Jan 19, 2016 at 8:48 AM, Steven White 
>> wrote:
>> > Hi everyone,
>> >
>> > Can I use facet on a field type of multiValued?  If so, how does facet
>> work
>> > with field type of "date" set as multiValued?
>> >
>> > Thanks
>> >
>> > Steve
>>


Faceting and multiValued field type

2016-01-19 Thread Steven White
Hi everyone,

Can I use facet on a field type of multiValued?  If so, how does facet work
with field type of "date" set as multiValued?

Thanks

Steve