Does ES support term facet with multiple fields each with a regular expression?

Hi all,
I know ES term facet supports multiple fields and a field with a regular
expression. But does it support the combination of those?
If so, a curl example would be appreciated, thank you.

For example, the format of documents is { timestamp: "yyyy.mm.dd", name:
"firstname.lastname" }
I want to do term facet on year and first name, If I can use regular
expression to extract year and firstname from both fields.
This is just a simple example if you do not understand my question. Plz do
not suggest to divide fields to smaller ones. That's not my question.
Thank you

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

If I understand, you want to use the year from timestamp and lastname from
the name field to form a facet value such as "Yang 2013"? If yes, you
would need to do this using a script. Probably native java script so you
can use some regex patterns to extract the data you want.

Thanks,
Matt Weber

On Sat, Jun 8, 2013 at 3:18 PM, Zhoutuo Yang zhoutuoy@gmail.com wrote:

Hi all,
I know ES term facet supports multiple fields and a field with a regular
expression. But does it support the combination of those?
If so, a curl example would be appreciated, thank you.

For example, the format of documents is { timestamp: "yyyy.mm.dd", name:
"firstname.lastname" }
I want to do term facet on year and first name, If I can use regular
expression to extract year and firstname from both fields.
This is just a simple example if you do not understand my question. Plz do
not suggest to divide fields to smaller ones. That's not my question.
Thank you

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Your understanding is correct. Do you mean do not rely on elastic search, I need to do this on my own or using elastic search scripting feature, I haven't looked at it?

--
Zhoutuo Yang
Sent with Airmail
On June 8, 2013 at 3:37:05 PM, Matt Weber (matt.weber@gmail.com) wrote:
If I understand, you want to use the year from timestamp and lastname from the name field to form a facet value such as "Yang 2013"? If yes, you would need to do this using a script. Probably native java script so you can use some regex patterns to extract the data you want.

Thanks,
Matt Weber

On Sat, Jun 8, 2013 at 3:18 PM, Zhoutuo Yang zhoutuoy@gmail.com wrote:
Hi all,
I know ES term facet supports multiple fields and a field with a regular expression. But does it support the combination of those?
If so, a curl example would be appreciated, thank you.

For example, the format of documents is { timestamp: "yyyy.mm.dd", name: "firstname.lastname" }
I want to do term facet on year and first name, If I can use regular expression to extract year and firstname from both fields.
This is just a simple example if you do not understand my question. Plz do not suggest to divide fields to smaller ones. That's not my question.
Thank you

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/vEdkTymhFLA/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Yes, you can't do that without using a script. You can define a script
field or just use the script option on the terms facet.

Thanks,
Matt Weber

On Sat, Jun 8, 2013 at 3:41 PM, Zhoutuo Yang zhoutuoy@gmail.com wrote:

Your understanding is correct. Do you mean do not rely on Elasticsearch,
I need to do this on my own or using Elasticsearch scripting feature, I
haven't looked at it?

--
Zhoutuo Yang
Sent with Airmail http://airmailapp.info/tracking

On June 8, 2013 at 3:37:05 PM, Matt Weber (matt.weber@gmail.com) wrote:

If I understand, you want to use the year from timestamp and lastname from
the name field to form a facet value such as "Yang 2013"? If yes, you
would need to do this using a script. Probably native java script so you
can use some regex patterns to extract the data you want.

Thanks,
Matt Weber

On Sat, Jun 8, 2013 at 3:18 PM, Zhoutuo Yang zhoutuoy@gmail.com wrote:

Hi all,
I know ES term facet supports multiple fields and a field with a regular
expression. But does it support the combination of those?
If so, a curl example would be appreciated, thank you.

For example, the format of documents is { timestamp: "yyyy.mm.dd", name:
"firstname.lastname" }
I want to do term facet on year and first name, If I can use regular
expression to extract year and firstname from both fields.
This is just a simple example if you do not understand my question. Plz
do not suggest to divide fields to smaller ones. That's not my question.
Thank you

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/vEdkTymhFLA/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Matt, thanks a lot.

--
Zhoutuo Yang
Sent with Airmail
On June 8, 2013 at 3:51:10 PM, Matt Weber (matt.weber@gmail.com) wrote:
Yes, you can't do that without using a script. You can define a script field or just use the script option on the terms facet.

Thanks,
Matt Weber

On Sat, Jun 8, 2013 at 3:41 PM, Zhoutuo Yang zhoutuoy@gmail.com wrote:
Your understanding is correct. Do you mean do not rely on elastic search, I need to do this on my own or using elastic search scripting feature, I haven't looked at it?

--
Zhoutuo Yang
Sent with Airmail
On June 8, 2013 at 3:37:05 PM, Matt Weber (matt.weber@gmail.com) wrote:
If I understand, you want to use the year from timestamp and lastname from the name field to form a facet value such as "Yang 2013"? If yes, you would need to do this using a script. Probably native java script so you can use some regex patterns to extract the data you want.

Thanks,
Matt Weber

On Sat, Jun 8, 2013 at 3:18 PM, Zhoutuo Yang zhoutuoy@gmail.com wrote:
Hi all,
I know ES term facet supports multiple fields and a field with a regular expression. But does it support the combination of those?
If so, a curl example would be appreciated, thank you.

For example, the format of documents is { timestamp: "yyyy.mm.dd", name: "firstname.lastname" }
I want to do term facet on year and first name, If I can use regular expression to extract year and firstname from both fields.
This is just a simple example if you do not understand my question. Plz do not suggest to divide fields to smaller ones. That's not my question.
Thank you

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/vEdkTymhFLA/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/vEdkTymhFLA/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.