Hi guys,
I'm trying to use a facet over a field and I'm making use of "multi_field"
in order to have a "keyword" analyzer over it.
Now for some strange reason it only works if I assign it to the field
called "name" not the field called "nameFacet", I guess a gist is worth
thousands of words
This https://gist.github.com/3498390 is the non-working version, note that
the mapping is over a field called "name" and it has two fields "name"
again and "nameFacet" which is the one that I assigned the keyword
analyzer, and is the one that I'm planning to use for faceted search.
And this one https://gist.github.com/3498562 that is exactly the same but
with the keyword analyzer over "name" instead of "nameFacet"
What is that that I'm doing wrong?
Is there any kind of restriction over on how I should call the field on my
objects?
Cheers
~M
--
Hey Maverick,
The reason you are experiencing this issue is because you are referring to
the facet as employmentHistory.nameFacet instead of using the full path of
employmentHistory.name.nameFacet. This of course is not an issue when
referring to name itself since it's actually the same name as it's "parent"
so it's inferred from that.
Also just as a side note: You are probably better of just setting index
to not_analyzed and removing the keyword analyzer as this will leave the
field untouched for the facet. It's not a huge deal but it's shorter and
makes the intent more obvious.
On Tuesday, 28 August 2012 09:42:45 UTC-5, maverick wrote:
Hi guys,
I'm trying to use a facet over a field and I'm making use of "multi_field"
in order to have a "keyword" analyzer over it.
Now for some strange reason it only works if I assign it to the field
called "name" not the field called "nameFacet", I guess a gist is worth
thousands of words
This facet test over employmentHistory · GitHub is the non-working version, note
that the mapping is over a field called "name" and it has two fields "name"
again and "nameFacet" which is the one that I assigned the keyword
analyzer, and is the one that I'm planning to use for faceted search.
And this one working version of multi_field facet · GitHub that is exactly the same but
with the keyword analyzer over "name" instead of "nameFacet"
What is that that I'm doing wrong?
Is there any kind of restriction over on how I should call the field on my
objects?
Cheers
~M
--
Thank you very much clatog.
That was indeed my mistake, I own you beer mate
cheers
On Tuesday, August 28, 2012 12:23:23 PM UTC-4, ciatog wrote:
Hey Maverick,
The reason you are experiencing this issue is because you are referring to
the facet as employmentHistory.nameFacet instead of using the full path of
employmentHistory.name.nameFacet. This of course is not an issue when
referring to name itself since it's actually the same name as it's "parent"
so it's inferred from that.
Also just as a side note: You are probably better of just setting index
to not_analyzed and removing the keyword analyzer as this will leave the
field untouched for the facet. It's not a huge deal but it's shorter and
makes the intent more obvious.
On Tuesday, 28 August 2012 09:42:45 UTC-5, maverick wrote:
Hi guys,
I'm trying to use a facet over a field and I'm making use of
"multi_field" in order to have a "keyword" analyzer over it.
Now for some strange reason it only works if I assign it to the field
called "name" not the field called "nameFacet", I guess a gist is worth
thousands of words
This facet test over employmentHistory · GitHub is the non-working version, note
that the mapping is over a field called "name" and it has two fields "name"
again and "nameFacet" which is the one that I assigned the keyword
analyzer, and is the one that I'm planning to use for faceted search.
And this one working version of multi_field facet · GitHub that is exactly the same
but with the keyword analyzer over "name" instead of "nameFacet"
What is that that I'm doing wrong?
Is there any kind of restriction over on how I should call the field on
my objects?
Cheers
~M
--