Inner/nested object term facet question (gisted)


(Mauricio Alarcon) #1

Hi guys

I'm trying to do a term facet query over a nested object but I haven't been
able to make it work. I was wondering if someone can give me some insights
on my mistake?

I've gisted here https://gist.github.com/3407734 but I always got zero term
facets. I've done other facets many times but seems that there's a trick on
this one.

Thanks

--


(Mauricio Alarcon) #2

Bump!.. nobody? c'mon guys

On Monday, August 20, 2012 5:12:31 PM UTC-4, maverick wrote:

Hi guys

I'm trying to do a term facet query over a nested object but I haven't
been able to make it work. I was wondering if someone can give me some
insights on my mistake?

I've gisted here https://gist.github.com/3407734 but I always got zero
term facets. I've done other facets many times but seems that there's a
trick on this one.

Thanks

--


(vineeth mohan) #3

There is not a single feed with data in the field -

educationHistory.nameFacet

Thanks
Vineeth

On Wed, Aug 22, 2012 at 6:49 PM, maverick mauricio.alarcon@gmail.comwrote:

Bump!.. nobody? c'mon guys

On Monday, August 20, 2012 5:12:31 PM UTC-4, maverick wrote:

Hi guys

I'm trying to do a term facet query over a nested object but I haven't
been able to make it work. I was wondering if someone can give me some
insights on my mistake?

I've gisted here https://gist.github.com/**3407734https://gist.github.com/3407734 but
I always got zero term facets. I've done other facets many times but seems
that there's a trick on this one.

Thanks

--

--


(Mauricio Alarcon) #4

Thanks Vineeth,

actually there is one, check the mapping, is a multi_field one of them is
"name" the other is "nameFacet" that is analyzed with "keyword" analyzer..

In any case, not even the educationHistory.name works

Any other ideas?

On Wednesday, August 22, 2012 9:48:04 AM UTC-4, Vineeth Mohan wrote:

There is not a single feed with data in the field -

educationHistory.nameFacet

Thanks
Vineeth

On Wed, Aug 22, 2012 at 6:49 PM, maverick <mauricio...@gmail.com<javascript:>

wrote:

Bump!.. nobody? c'mon guys

On Monday, August 20, 2012 5:12:31 PM UTC-4, maverick wrote:

Hi guys

I'm trying to do a term facet query over a nested object but I haven't
been able to make it work. I was wondering if someone can give me some
insights on my mistake?

I've gisted here https://gist.github.com/**3407734https://gist.github.com/3407734 but
I always got zero term facets. I've done other facets many times but seems
that there's a trick on this one.

Thanks

--

--


(Ivan Brusic) #5

Your mapping is incorrect. The first field in the JSON mapping refers
to the type (which is redundant given the URL, but that's how it is).

Take a look at the PUT mapping example:

http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html

Also, your mapping redefines employmentHistory but the facet is on
educationHistory.

Cheers,

Ivan

On Wed, Aug 22, 2012 at 8:01 AM, maverick mauricio.alarcon@gmail.com wrote:

Thanks Vineeth,

actually there is one, check the mapping, is a multi_field one of them is
"name" the other is "nameFacet" that is analyzed with "keyword" analyzer..

In any case, not even the educationHistory.name works

Any other ideas?

On Wednesday, August 22, 2012 9:48:04 AM UTC-4, Vineeth Mohan wrote:

There is not a single feed with data in the field -

educationHistory.nameFacet

Thanks
Vineeth

On Wed, Aug 22, 2012 at 6:49 PM, maverick mauricio...@gmail.com wrote:

Bump!.. nobody? c'mon guys

On Monday, August 20, 2012 5:12:31 PM UTC-4, maverick wrote:

Hi guys

I'm trying to do a term facet query over a nested object but I haven't
been able to make it work. I was wondering if someone can give me some
insights on my mistake?

I've gisted here https://gist.github.com/3407734 but I always got zero
term facets. I've done other facets many times but seems that there's a
trick on this one.

Thanks

--

--

--


(Mauricio Alarcon) #6

Ivan,

Thank you very much, I fixed part of it with your help. It still needs some
other tune up.. I'll post again with the current issue

Cheers

On Wednesday, August 22, 2012 1:51:42 PM UTC-4, Ivan Brusic wrote:

Your mapping is incorrect. The first field in the JSON mapping refers
to the type (which is redundant given the URL, but that's how it is).

Take a look at the PUT mapping example:

http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping.html

Also, your mapping redefines employmentHistory but the facet is on
educationHistory.

Cheers,

Ivan

On Wed, Aug 22, 2012 at 8:01 AM, maverick <mauricio...@gmail.com<javascript:>>
wrote:

Thanks Vineeth,

actually there is one, check the mapping, is a multi_field one of them
is
"name" the other is "nameFacet" that is analyzed with "keyword"
analyzer..

In any case, not even the educationHistory.name works

Any other ideas?

On Wednesday, August 22, 2012 9:48:04 AM UTC-4, Vineeth Mohan wrote:

There is not a single feed with data in the field -

educationHistory.nameFacet

Thanks
Vineeth

On Wed, Aug 22, 2012 at 6:49 PM, maverick mauricio...@gmail.com
wrote:

Bump!.. nobody? c'mon guys

On Monday, August 20, 2012 5:12:31 PM UTC-4, maverick wrote:

Hi guys

I'm trying to do a term facet query over a nested object but I
haven't

been able to make it work. I was wondering if someone can give me
some

insights on my mistake?

I've gisted here https://gist.github.com/3407734 but I always got
zero

term facets. I've done other facets many times but seems that
there's a

trick on this one.

Thanks

--

--

--


(system) #7