Problem with synonym token filter

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

You need to use the proper tokenizer.

http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html

"The tokenizer parameter controls the tokenizers that will be used to
tokenize the synonym, and defaults to the whitespace tokenizer."

On Tuesday, February 19, 2013 8:39:14 AM UTC-5, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

hi,

Thanks for reply,
may you explain me. which type of tokenizer should use for this purpose.
I have used used letter,standard and whitespacedelimeter but not got any
solution.

Thanks

Raj

On Tuesday, February 19, 2013 7:21:14 PM UTC+5:30, egaumer wrote:

You need to use the proper tokenizer.

http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html

"The tokenizer parameter controls the tokenizers that will be used to
tokenize the synonym, and defaults to the whitespace tokenizer."

On Tuesday, February 19, 2013 8:39:14 AM UTC-5, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

Sounds like you want synonym phrases. My recommendation is to:

  • Perform index time synonym expansion
  • On the search side do NOT include the synonym filter in your analyzer

If this doesn't help, please provide examples showing what you believe to
be incorrect behavior.

Thanks,
Paul

On Tuesday, February 19, 2013 11:45:43 PM UTC-7, raj wrote:

hi,

Thanks for reply,
may you explain me. which type of tokenizer should use for this purpose.
I have used used letter,standard and whitespacedelimeter but not got any
solution.

Thanks

Raj

On Tuesday, February 19, 2013 7:21:14 PM UTC+5:30, egaumer wrote:

You need to use the proper tokenizer.

http://www.elasticsearch.org/guide/reference/index-modules/analysis/synonym-tokenfilter.html

"The tokenizer parameter controls the tokenizers that will be used to
tokenize the synonym, and defaults to the whitespace tokenizer."

On Tuesday, February 19, 2013 8:39:14 AM UTC-5, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

On Tuesday, February 19, 2013 7:09:14 PM UTC+5:30, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

On Tuesday, February 19, 2013 7:09:14 PM UTC+5:30, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

Hi ppearcy,

I have changed my elastic search version to 0.20.5 it's working good and
solve my problem.
but now If I search using query "oracle company", i got both "sap" and
"oracle company" reverse also working proper.
but when I am searching using query "oracle" or "company" i got also same
result. it's wrong.
in my synonym file I have
oracle company,sap

why "sap" is match to single word "oracle" or "company"?

please suggest.

Thanks
Rajesh

On Tuesday, February 19, 2013 7:09:14 PM UTC+5:30, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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

What changes have you made to the original mapping? I noticed a few issues,
but you must have changed it after you originally posted if you got it to
work somewhat.

Your synonym filter is being applied to the analyzed tokens of the stream.
Try using the analyze API on the text using the analyzer used to index it.

--
Ivan

On Wed, Feb 27, 2013 at 4:25 AM, raj rajesh.elasticsearch@gmail.com wrote:

Hi ppearcy,

I have changed my elastic search version to 0.20.5 it's working good and
solve my problem.
but now If I search using query "oracle company", i got both "sap" and
"oracle company" reverse also working proper.
but when I am searching using query "oracle" or "company" i got also same
result. it's wrong.
in my synonym file I have
oracle company,sap

why "sap" is match to single word "oracle" or "company"?

please suggest.

Thanks
Rajesh

On Tuesday, February 19, 2013 7:09:14 PM UTC+5:30, raj wrote:

Hi

I am newbie with elastic search.i need to use synonym filter to meet my
requirement.

my used mapping details and synonym text file on :
https://gist.github.com/**rajesh07/4985901https://gist.github.com/rajesh07/4985901

Requirement:

  1. I need to search both direction means*

oracle=sap and sap=oracle*
This it's works nicely but when using below one :

oracle company=sap and sap =oracle company

It doesn't work.

when i remove the space between oracle company (like oraclecompany) it's
give me desired results.

so final conclusion from my side that synonym does not support space
between word combination.

please help me to sorted out this problem.

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