nmosafi
(nmosafi)
January 17, 2011, 11:51pm
1
Say I have two documents like so:
{ "field1": "hello", "field2": "world" }
{ "field1": "moo" }
And I run a terms facet on field2.
It would give me count 1 for "world" but I would also want a count of
1 for null. Is this possible to achieve this somehow?
(Note: all fields are set to non_analysed in the dynamic_mapping.json)
Thanks
Neil
kimchy
(Shay Banon)
January 18, 2011, 12:21am
2
Sure, quite simple to implement, can you open a feature request?
On Tuesday, January 18, 2011 at 1:51 AM, Neil Mosafi wrote:
Say I have two documents like so:
{ "field1": "hello", "field2": "world" }
{ "field1": "moo" }
And I run a terms facet on field2.
It would give me count 1 for "world" but I would also want a count of
1 for null. Is this possible to achieve this somehow?
(Note: all fields are set to non_analysed in the dynamic_mapping.json)
Thanks
Neil
nmosafi
(nmosafi)
January 18, 2011, 6:15pm
3
Yep, here is it
opened 06:14PM - 18 Jan 11 UTC
closed 07:51PM - 18 Jan 11 UTC
>enhancement
v0.15.0
Say I have two documents like so:
{ "field1": "hello", "field2": "world" }
… { "field1": "moo" }
And I run a terms facet on field2.
It would give me count 1 for "world" but I would also want a count of 1 for null.
(Note: all fields are set to non_analysed in the dynamic_mapping.json)
Cheers
On Jan 18, 12:21 am, Shay Banon shay.ba...@elasticsearch.com wrote:
Sure, quite simple to implement, can you open a feature request?
On Tuesday, January 18, 2011 at 1:51 AM, Neil Mosafi wrote:
Say I have two documents like so:
{ "field1": "hello", "field2": "world" }
{ "field1": "moo" }
And I run a terms facet on field2.
It would give me count 1 for "world" but I would also want a count of
1 for null. Is this possible to achieve this somehow?
(Note: all fields are set to non_analysed in the dynamic_mapping.json)
Thanks
Neil
ppearcy
(ppearcy)
January 19, 2011, 2:26am
4
Looks like this was just added, sweet
Curious, will this functionality treat all the following the same for
field2?
{ "field1": "moo" }
{ "field1": "moo", "field2": null }
{ "field1": "moo", "field2": "" }
Thanks!
On Jan 18, 11:15 am, Neil Mosafi nmos...@gmail.com wrote:
Yep, here is it
Terms Facet: Add option include counts where term is missing · Issue #632 · elastic/elasticsearch · GitHub
Cheers
On Jan 18, 12:21 am, Shay Banon shay.ba...@elasticsearch.com wrote:
Sure, quite simple to implement, can you open a feature request?
On Tuesday, January 18, 2011 at 1:51 AM, Neil Mosafi wrote:
Say I have two documents like so:
{ "field1": "hello", "field2": "world" }
{ "field1": "moo" }
And I run a terms facet on field2.
It would give me count 1 for "world" but I would also want a count of
1 for null. Is this possible to achieve this somehow?
(Note: all fields are set to non_analysed in the dynamic_mapping.json)
Thanks
Neil
kimchy
(Shay Banon)
January 19, 2011, 9:50am
5
Yea, though null values are generally better to use than empty strings.
On Wednesday, January 19, 2011 at 4:26 AM, Paul wrote:
Looks like this was just added, sweet
Curious, will this functionality treat all the following the same for
field2?
{ "field1": "moo" }
{ "field1": "moo", "field2": null }
{ "field1": "moo", "field2": "" }
Thanks!
On Jan 18, 11:15 am, Neil Mosafi nmos...@gmail.com wrote:
Yep, here is it
Terms Facet: Add option include counts where term is missing · Issue #632 · elastic/elasticsearch · GitHub
Cheers
On Jan 18, 12:21 am, Shay Banon shay.ba...@elasticsearch.com wrote:
Sure, quite simple to implement, can you open a feature request?
On Tuesday, January 18, 2011 at 1:51 AM, Neil Mosafi wrote:
Say I have two documents like so:
{ "field1": "hello", "field2": "world" }
{ "field1": "moo" }
And I run a terms facet on field2.
It would give me count 1 for "world" but I would also want a count of
1 for null. Is this possible to achieve this somehow?
(Note: all fields are set to non_analysed in the dynamic_mapping.json)
Thanks
Neil