Java Client Aggregation question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Java Client Aggregation question

Matt Williams
Hi all,

I am currently indexing tags (industries) for an entity with a data structure like this:

industry: ["Consulting & Recruitment","Professional Services","Education & Training"] 

I am applying a termsAggregation to the query as:

AggregationBuilders.terms("industry").field("industry");

What I expect to come out:

Key: "Consulting & Recruitment"

docCount: 100

What I actually get:

Key: "Consulting"

docCount: 100

Key: "Recruitment"

docCount: 100.

Is there a way to correct this?

Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e86c02ab-9699-41ea-88b3-871ed761dad6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java Client Aggregation question

dadoonet
Yes. Change your mapping and define the field as not_analyzed.

-- 
David Pilato | Technical Advocate | Elasticsearch.com



Le 20 févr. 2015 à 12:32, Matt Williams <[hidden email]> a écrit :

Hi all,

I am currently indexing tags (industries) for an entity with a data structure like this:

industry: ["Consulting & Recruitment","Professional Services","Education & Training"] 

I am applying a termsAggregation to the query as:

AggregationBuilders.terms("industry").field("industry");

What I expect to come out:

Key: "Consulting & Recruitment"

docCount: 100

What I actually get:

Key: "Consulting"

docCount: 100

Key: "Recruitment"

docCount: 100.

Is there a way to correct this?

Thanks


--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e86c02ab-9699-41ea-88b3-871ed761dad6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6A33DAF3-C491-4EBA-8C1D-77F83C52160F%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Java Client Aggregation question

Carter89
This post has NOT been accepted by the mailing list yet.
In reply to this post by Matt Williams
change your mapping and define all of filed as @dadoonet said..  Online Writing Service help with essay
Loading...