Combining Analyzer/Tokenizer in one

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Combining Analyzer/Tokenizer in one

Pablo Molnar
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Combining Analyzer/Tokenizer in one

dadoonet
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 ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 25 juil. 2013 à 03:24, Pablo Molnar <[hidden email]> 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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Combining Analyzer/Tokenizer in one

Pablo Molnar
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 <[hidden email]> 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 ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 25 juil. 2013 à 03:24, Pablo Molnar <[hidden email]> 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 [hidden email].

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 [hidden email].
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Combining Analyzer/Tokenizer in one

Benjamin Devèze
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="0p6n9tasYt8J">da...@...> 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 ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 25 juil. 2013 à 03:24, Pablo Molnar <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="0p6n9tasYt8J">pablo...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="0p6n9tasYt8J">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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="0p6n9tasYt8J">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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Combining Analyzer/Tokenizer in one

Pablo Molnar
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 <[hidden email]> 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 ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs


Le 25 juil. 2013 à 03:24, Pablo Molnar <[hidden email]> 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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.