Combining Analyzer/Tokenizer in one

Hello fellas,

It is possible to have an analyzer that the result is the combination of
other two analyzers ("keyword" and "standard" in my case)

e.g.: Given "twenty-eight-year-old"

/_analyze?text=twenty-eight-year-old&analyzer=standard* *returns [twenty,
eight, year, old]
/_analyze?text=twenty-eight-year-old&analyzer=keyword returns [
twenty-eight-year-old]

My goal is having a single analyzer that returns [twenty-eight-year-old, twenty,eight,
year, old]

Thanks,
Pablo

--
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.

Not exactly the answer you may expect but you could use multifield to set both analyzers to the same field and then search in both subfields...

Does it help?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 juil. 2013 à 03:24, Pablo Molnar pablomolnar@gmail.com a écrit :

Hello fellas,

It is possible to have an analyzer that the result is the combination of other two analyzers ("keyword" and "standard" in my case)

e.g.: Given "twenty-eight-year-old"

/_analyze?text=twenty-eight-year-old&analyzer=standard returns [twenty, eight, year, old]
/_analyze?text=twenty-eight-year-old&analyzer=keyword returns [twenty-eight-year-old]

My goal is having a single analyzer that returns [twenty-eight-year-old, twenty,eight, year, old]

Thanks,
Pablo

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.

Hi David,

I'm aware about the multifield feature but the thing is I wanna leave the
consumer logic the most transparent/clean/decouple as possible (avoiding
conditionals, hitting ES more than once or know about internal stuff like
field.$analyzer)

On Wed, Jul 24, 2013 at 7:57 PM, David Pilato david@pilato.fr wrote:

Not exactly the answer you may expect but you could use multifield to set
both analyzers to the same field and then search in both subfields...

Does it help?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 juil. 2013 à 03:24, Pablo Molnar pablomolnar@gmail.com a écrit :

Hello fellas,

It is possible to have an analyzer that the result is the combination of
other two analyzers ("keyword" and "standard" in my case)

e.g.: Given "twenty-eight-year-old"

/_analyze?text=twenty-eight-year-old&analyzer=standard* *returns [twenty,
eight, year, old]
/_analyze?text=twenty-eight-year-old&analyzer=keyword returns [
twenty-eight-year-old]

My goal is having a single analyzer that returns [twenty-eight-year-old, twenty,eight,
year, old]

Thanks,
Pablo

--
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/uonGcN6boeo/unsubscribe.
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 should maybe have a look at the combo analyzer that you can find there:

On Thursday, July 25, 2013 9:09:37 AM UTC+2, Pablo Molnar wrote:

Hi David,

I'm aware about the multifield feature but the thing is I wanna leave the
consumer logic the most transparent/clean/decouple as possible (avoiding
conditionals, hitting ES more than once or know about internal stuff like
field.$analyzer)

On Wed, Jul 24, 2013 at 7:57 PM, David Pilato <da...@pilato.fr<javascript:>

wrote:

Not exactly the answer you may expect but you could use multifield to set
both analyzers to the same field and then search in both subfields...

Does it help?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 juil. 2013 à 03:24, Pablo Molnar <pablo...@gmail.com <javascript:>>
a écrit :

Hello fellas,

It is possible to have an analyzer that the result is the combination of
other two analyzers ("keyword" and "standard" in my case)

e.g.: Given "twenty-eight-year-old"

/_analyze?text=twenty-eight-year-old&analyzer=standard* *returns
[twenty, eight, year, old]
/_analyze?text=twenty-eight-year-old&analyzer=keyword returns [
twenty-eight-year-old]

My goal is having a single analyzer that returns [twenty-eight-year-old, twenty,eight,
year, old]

Thanks,
Pablo

--
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 elasticsearc...@googlegroups.com <javascript:>.

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/uonGcN6boeo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
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.

Thanks Benjamin, that was exactly what I was looking for.

On Thursday, July 25, 2013 9:06:51 AM UTC-7, Benjamin Devèze wrote:

You should maybe have a look at the combo analyzer that you can find
there: https://github.com/yakaz/elasticsearch-analysis-combo

On Thursday, July 25, 2013 9:09:37 AM UTC+2, Pablo Molnar wrote:

Hi David,

I'm aware about the multifield feature but the thing is I wanna leave the
consumer logic the most transparent/clean/decouple as possible (avoiding
conditionals, hitting ES more than once or know about internal stuff like
field.$analyzer)

On Wed, Jul 24, 2013 at 7:57 PM, David Pilato da...@pilato.fr wrote:

Not exactly the answer you may expect but you could use multifield to
set both analyzers to the same field and then search in both subfields...

Does it help?

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 25 juil. 2013 à 03:24, Pablo Molnar pablo...@gmail.com a écrit :

Hello fellas,

It is possible to have an analyzer that the result is the combination of
other two analyzers ("keyword" and "standard" in my case)

e.g.: Given "twenty-eight-year-old"

/_analyze?text=twenty-eight-year-old&analyzer=standard* *returns
[twenty, eight, year, old]
/_analyze?text=twenty-eight-year-old&analyzer=keyword returns [
twenty-eight-year-old]

My goal is having a single analyzer that returns [twenty-eight-year-old,
twenty,eight, year, old]

Thanks,
Pablo

--
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 elasticsearc...@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/uonGcN6boeo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@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.