# Query side synonyms and boosts

**URL:** https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624
**Category:** Elasticsearch
**Created:** [May 9, 2012, 11:45pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624 "2012-05-09T23:45:18Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![my3sons](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@my3sons](https://discuss.elastic.co/u/my3sons)
#### Post date: [May 9, 2012, 11:45pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/1 "2012-05-09T23:45:18Z")

</div>

Hello,

While doing some testing with query side synonyms and boosts, I am noticing  
that the boosts do not seem to be honored for synonym derived keywords. For  
example, if I have defined a boost when the keyword is "ipad" and I have  
also defined a synonym where "i pad" =\> "ipad", if then submit a search  
with "i pad" as my keyword, I do see that the synonym fired accordingly,  
but the boost I have for ipad is not honored. Is there anyway to leverage  
both the synonym and boost, without having to duplicate all my boosts  
across the synonym terms, as we will have thousands of synonyms.

I would be curious to know how ES implements synonyms under the hood.

Thanks!

---

<div class="post-metadata">

### Author: ![my3sons](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@my3sons](https://discuss.elastic.co/u/my3sons)
#### Post date: [May 10, 2012, 1:38am UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/2 "2012-05-10T01:38:33Z")

</div>

After further review, it was dumbass user error that was the root cause for  
the boosts not firing 🙂 However, that being said, I am still looking  
for a way to honor both synonyms and boosts on the query side if possible.  
If I understood better how synonyms are implemented under the hood, that  
might help me come up with solution. Does it simply create a bool "OR"  
query for all the terms in the synonym?

On Wed, May 9, 2012 at 6:45 PM, Carey Boldenow [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:

> Hello,
> 
> While doing some testing with query side synonyms and boosts, I am  
> noticing that the boosts do not seem to be honored for synonym derived  
> keywords. For example, if I have defined a boost when the keyword is "ipad"  
> and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> search with "i pad" as my keyword, I do see that the synonym fired  
> accordingly, but the boost I have for ipad is not honored. Is there anyway  
> to leverage both the synonym and boost, without having to duplicate all my  
> boosts across the synonym terms, as we will have thousands of synonyms.
> 
> I would be curious to know how ES implements synonyms under the hood.
> 
> Thanks!

---

<div class="post-metadata">

### Author: ![my3sons](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@my3sons](https://discuss.elastic.co/u/my3sons)
#### Post date: [May 10, 2012, 1:59am UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/3 "2012-05-10T01:59:50Z")

</div>

Please disregard the above as I was able to get the boosts to fire on my  
synonyms. It's amazing what you can do when one actually reviews their own  
code 😉 If not a problem, I would still be interested to know at a high  
level how the synonyms are implemented on the query side.

On Wed, May 9, 2012 at 8:38 PM, Carey Boldenow [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:

> After further review, it was dumbass user error that was the root cause  
> for the boosts not firing 🙂 However, that being said, I am still  
> looking for a way to honor both synonyms and boosts on the query side if  
> possible. If I understood better how synonyms are implemented under the  
> hood, that might help me come up with solution. Does it simply create a  
> bool "OR" query for all the terms in the synonym?
> 
> On Wed, May 9, 2012 at 6:45 PM, Carey Boldenow [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> 
> > Hello,
> > 
> > While doing some testing with query side synonyms and boosts, I am  
> > noticing that the boosts do not seem to be honored for synonym derived  
> > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > search with "i pad" as my keyword, I do see that the synonym fired  
> > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > to leverage both the synonym and boost, without having to duplicate all my  
> > boosts across the synonym terms, as we will have thousands of synonyms.
> > 
> > I would be curious to know how ES implements synonyms under the hood.
> > 
> > Thanks!

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [May 13, 2012, 9:40am UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/4 "2012-05-13T09:40:38Z")

</div>

Effectively, if you do a text/query\_string query on a field with an  
analyzer (search\_analyzer more specifically) that expands to several  
tokens, they will be OR'ed, yes.

On Thu, May 10, 2012 at 4:59 AM, Carey Boldenow [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:

> Please disregard the above as I was able to get the boosts to fire on my  
> synonyms. It's amazing what you can do when one actually reviews their own  
> code 😉 If not a problem, I would still be interested to know at a high  
> level how the synonyms are implemented on the query side.
> 
> On Wed, May 9, 2012 at 8:38 PM, Carey Boldenow [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> 
> > After further review, it was dumbass user error that was the root cause  
> > for the boosts not firing 🙂 However, that being said, I am still  
> > looking for a way to honor both synonyms and boosts on the query side if  
> > possible. If I understood better how synonyms are implemented under the  
> > hood, that might help me come up with solution. Does it simply create a  
> > bool "OR" query for all the terms in the synonym?
> > 
> > On Wed, May 9, 2012 at 6:45 PM, Carey Boldenow [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > 
> > > Hello,
> > > 
> > > While doing some testing with query side synonyms and boosts, I am  
> > > noticing that the boosts do not seem to be honored for synonym derived  
> > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > to leverage both the synonym and boost, without having to duplicate all my  
> > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > 
> > > I would be curious to know how ES implements synonyms under the hood.
> > > 
> > > Thanks!

---

<div class="post-metadata">

### Author: ![my3sons](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@my3sons](https://discuss.elastic.co/u/my3sons)
#### Post date: [May 13, 2012, 1:05pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/5 "2012-05-13T13:05:42Z")

</div>

Thanks Shay! One last question regarding this, although I think I know  
what the answer is. We are using ES to hopefully build a search solution  
for a rather large ecommerce site, and two guiding principles we know going  
in are; change will be constant, and outages are never acceptable.  
Therefore, for synonyms, it appears as though even if only executed on the  
query side, any changes to the synonym list require a close/open on the  
index at a minimum. Is there any other way to make those synonym changes  
real-time (i.e. cache flush of some sort)?

On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:

> Hello,
> 
> While doing some testing with query side synonyms and boosts, I am  
> noticing that the boosts do not seem to be honored for synonym derived  
> keywords. For example, if I have defined a boost when the keyword is "ipad"  
> and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> search with "i pad" as my keyword, I do see that the synonym fired  
> accordingly, but the boost I have for ipad is not honored. Is there anyway  
> to leverage both the synonym and boost, without having to duplicate all my  
> boosts across the synonym terms, as we will have thousands of synonyms.
> 
> I would be curious to know how ES implements synonyms under the hood.
> 
> Thanks!

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [May 15, 2012, 8:21pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/6 "2012-05-15T20:21:54Z")

</div>

Yes, its is possible to automatic load changes to the synonym file, just  
require some work.

On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com) wrote:

> Thanks Shay! One last question regarding this, although I think I know  
> what the answer is. We are using ES to hopefully build a search solution  
> for a rather large ecommerce site, and two guiding principles we know going  
> in are; change will be constant, and outages are never acceptable.  
> Therefore, for synonyms, it appears as though even if only executed on the  
> query side, any changes to the synonym list require a close/open on the  
> index at a minimum. Is there any other way to make those synonym changes  
> real-time (i.e. cache flush of some sort)?
> 
> On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> 
> > Hello,
> > 
> > While doing some testing with query side synonyms and boosts, I am  
> > noticing that the boosts do not seem to be honored for synonym derived  
> > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > search with "i pad" as my keyword, I do see that the synonym fired  
> > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > to leverage both the synonym and boost, without having to duplicate all my  
> > boosts across the synonym terms, as we will have thousands of synonyms.
> > 
> > I would be curious to know how ES implements synonyms under the hood.
> > 
> > Thanks!

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [May 15, 2012, 8:22pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/7 "2012-05-15T20:22:08Z")

</div>

Btw, can you open an issue for it?

On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Yes, its is possible to automatic load changes to the synonym file, just  
> require some work.
> 
> On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com) wrote:
> 
> > Thanks Shay! One last question regarding this, although I think I know  
> > what the answer is. We are using ES to hopefully build a search solution  
> > for a rather large ecommerce site, and two guiding principles we know going  
> > in are; change will be constant, and outages are never acceptable.  
> > Therefore, for synonyms, it appears as though even if only executed on the  
> > query side, any changes to the synonym list require a close/open on the  
> > index at a minimum. Is there any other way to make those synonym changes  
> > real-time (i.e. cache flush of some sort)?
> > 
> > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > 
> > > Hello,
> > > 
> > > While doing some testing with query side synonyms and boosts, I am  
> > > noticing that the boosts do not seem to be honored for synonym derived  
> > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > to leverage both the synonym and boost, without having to duplicate all my  
> > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > 
> > > I would be curious to know how ES implements synonyms under the hood.
> > > 
> > > Thanks!

---

<div class="post-metadata">

### Author: ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)
#### Post date: [May 15, 2012, 11:25pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/8 "2012-05-15T23:25:16Z")

</div>

That would be a great feature. Many of our search relevancy issues are  
solved with synonyms. 😉

--  
Ivan

On Tue, May 15, 2012 at 1:22 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> Btw, can you open an issue for it?
> 
> On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Yes, its is possible to automatic load changes to the synonym file, just  
> > require some work.
> > 
> > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com) wrote:
> > 
> > > Thanks Shay! One last question regarding this, although I think I know  
> > > what the answer is. We are using ES to hopefully build a search solution for  
> > > a rather large ecommerce site, and two guiding principles we know going in  
> > > are; change will be constant, and outages are never acceptable. Therefore,  
> > > for synonyms, it appears as though even if only executed on the query side,  
> > > any changes to the synonym list require a close/open on the index at a  
> > > minimum. Is there any other way to make those synonym changes real-time  
> > > (i.e. cache flush of some sort)?
> > > 
> > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > 
> > > > Hello,
> > > > 
> > > > While doing some testing with query side synonyms and boosts, I am  
> > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > 
> > > > I would be curious to know how ES implements synonyms under the hood.
> > > > 
> > > > Thanks!

---

<div class="post-metadata">

### Author: ![my3sons](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@my3sons](https://discuss.elastic.co/u/my3sons)
#### Post date: [May 16, 2012, 2:10am UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/9 "2012-05-16T02:10:11Z")

</div>

Absolutely, will do...

On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:

> Btw, can you open an issue for it?
> 
> On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Yes, its is possible to automatic load changes to the synonym file, just  
> > require some work.
> > 
> > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > 
> > > Thanks Shay! One last question regarding this, although I think I know  
> > > what the answer is. We are using ES to hopefully build a search solution  
> > > for a rather large ecommerce site, and two guiding principles we know going  
> > > in are; change will be constant, and outages are never acceptable.  
> > > Therefore, for synonyms, it appears as though even if only executed on the  
> > > query side, any changes to the synonym list require a close/open on the  
> > > index at a minimum. Is there any other way to make those synonym changes  
> > > real-time (i.e. cache flush of some sort)?
> > > 
> > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > 
> > > > Hello,
> > > > 
> > > > While doing some testing with query side synonyms and boosts, I am  
> > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > 
> > > > I would be curious to know how ES implements synonyms under the hood.
> > > > 
> > > > Thanks!

On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:

> Btw, can you open an issue for it?
> 
> On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Yes, its is possible to automatic load changes to the synonym file, just  
> > require some work.
> > 
> > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > 
> > > Thanks Shay! One last question regarding this, although I think I know  
> > > what the answer is. We are using ES to hopefully build a search solution  
> > > for a rather large ecommerce site, and two guiding principles we know going  
> > > in are; change will be constant, and outages are never acceptable.  
> > > Therefore, for synonyms, it appears as though even if only executed on the  
> > > query side, any changes to the synonym list require a close/open on the  
> > > index at a minimum. Is there any other way to make those synonym changes  
> > > real-time (i.e. cache flush of some sort)?
> > > 
> > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > 
> > > > Hello,
> > > > 
> > > > While doing some testing with query side synonyms and boosts, I am  
> > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > 
> > > > I would be curious to know how ES implements synonyms under the hood.
> > > > 
> > > > Thanks!

On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:

> Btw, can you open an issue for it?
> 
> On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Yes, its is possible to automatic load changes to the synonym file, just  
> > require some work.
> > 
> > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > 
> > > Thanks Shay! One last question regarding this, although I think I know  
> > > what the answer is. We are using ES to hopefully build a search solution  
> > > for a rather large ecommerce site, and two guiding principles we know going  
> > > in are; change will be constant, and outages are never acceptable.  
> > > Therefore, for synonyms, it appears as though even if only executed on the  
> > > query side, any changes to the synonym list require a close/open on the  
> > > index at a minimum. Is there any other way to make those synonym changes  
> > > real-time (i.e. cache flush of some sort)?
> > > 
> > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > 
> > > > Hello,
> > > > 
> > > > While doing some testing with query side synonyms and boosts, I am  
> > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > 
> > > > I would be curious to know how ES implements synonyms under the hood.
> > > > 
> > > > Thanks!

On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:

> Btw, can you open an issue for it?
> 
> On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> 
> > Yes, its is possible to automatic load changes to the synonym file, just  
> > require some work.
> > 
> > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > 
> > > Thanks Shay! One last question regarding this, although I think I know  
> > > what the answer is. We are using ES to hopefully build a search solution  
> > > for a rather large ecommerce site, and two guiding principles we know going  
> > > in are; change will be constant, and outages are never acceptable.  
> > > Therefore, for synonyms, it appears as though even if only executed on the  
> > > query side, any changes to the synonym list require a close/open on the  
> > > index at a minimum. Is there any other way to make those synonym changes  
> > > real-time (i.e. cache flush of some sort)?
> > > 
> > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > 
> > > > Hello,
> > > > 
> > > > While doing some testing with query side synonyms and boosts, I am  
> > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > 
> > > > I would be curious to know how ES implements synonyms under the hood.
> > > > 
> > > > Thanks!

---

<div class="post-metadata">

### Author: ![my3sons](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@my3sons](https://discuss.elastic.co/u/my3sons)
#### Post date: [May 16, 2012, 1:18pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/10 "2012-05-16T13:18:50Z")

</div>

done.... [Provide ability to apply query side synonym changes in real-time · Issue #1956 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1956)

On Tue, May 15, 2012 at 9:10 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com) wrote:

> Absolutely, will do...
> 
> On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:
> 
> > Btw, can you open an issue for it?
> > 
> > On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > 
> > > Yes, its is possible to automatic load changes to the synonym file, just  
> > > require some work.
> > > 
> > > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > > 
> > > > Thanks Shay! One last question regarding this, although I think I  
> > > > know what the answer is. We are using ES to hopefully build a search  
> > > > solution for a rather large ecommerce site, and two guiding principles we  
> > > > know going in are; change will be constant, and outages are never  
> > > > acceptable. Therefore, for synonyms, it appears as though even if only  
> > > > executed on the query side, any changes to the synonym list require a  
> > > > close/open on the index at a minimum. Is there any other way to make those  
> > > > synonym changes real-time (i.e. cache flush of some sort)?
> > > > 
> > > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > While doing some testing with query side synonyms and boosts, I am  
> > > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > > 
> > > > > I would be curious to know how ES implements synonyms under the hood.
> > > > > 
> > > > > Thanks!
> 
> On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:
> 
> > Btw, can you open an issue for it?
> > 
> > On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > 
> > > Yes, its is possible to automatic load changes to the synonym file, just  
> > > require some work.
> > > 
> > > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > > 
> > > > Thanks Shay! One last question regarding this, although I think I  
> > > > know what the answer is. We are using ES to hopefully build a search  
> > > > solution for a rather large ecommerce site, and two guiding principles we  
> > > > know going in are; change will be constant, and outages are never  
> > > > acceptable. Therefore, for synonyms, it appears as though even if only  
> > > > executed on the query side, any changes to the synonym list require a  
> > > > close/open on the index at a minimum. Is there any other way to make those  
> > > > synonym changes real-time (i.e. cache flush of some sort)?
> > > > 
> > > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > While doing some testing with query side synonyms and boosts, I am  
> > > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > > 
> > > > > I would be curious to know how ES implements synonyms under the hood.
> > > > > 
> > > > > Thanks!
> 
> On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:
> 
> > Btw, can you open an issue for it?
> > 
> > On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > 
> > > Yes, its is possible to automatic load changes to the synonym file, just  
> > > require some work.
> > > 
> > > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > > 
> > > > Thanks Shay! One last question regarding this, although I think I  
> > > > know what the answer is. We are using ES to hopefully build a search  
> > > > solution for a rather large ecommerce site, and two guiding principles we  
> > > > know going in are; change will be constant, and outages are never  
> > > > acceptable. Therefore, for synonyms, it appears as though even if only  
> > > > executed on the query side, any changes to the synonym list require a  
> > > > close/open on the index at a minimum. Is there any other way to make those  
> > > > synonym changes real-time (i.e. cache flush of some sort)?
> > > > 
> > > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > While doing some testing with query side synonyms and boosts, I am  
> > > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > > 
> > > > > I would be curious to know how ES implements synonyms under the hood.
> > > > > 
> > > > > Thanks!
> 
> On Tuesday, May 15, 2012 3:22:08 PM UTC-5, kimchy wrote:
> 
> > Btw, can you open an issue for it?
> > 
> > On Tue, May 15, 2012 at 11:21 PM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:
> > 
> > > Yes, its is possible to automatic load changes to the synonym file, just  
> > > require some work.
> > > 
> > > On Sun, May 13, 2012 at 4:05 PM, my3sons [carey.boldenow@gmail.com](mailto:carey.boldenow@gmail.com)wrote:
> > > 
> > > > Thanks Shay! One last question regarding this, although I think I  
> > > > know what the answer is. We are using ES to hopefully build a search  
> > > > solution for a rather large ecommerce site, and two guiding principles we  
> > > > know going in are; change will be constant, and outages are never  
> > > > acceptable. Therefore, for synonyms, it appears as though even if only  
> > > > executed on the query side, any changes to the synonym list require a  
> > > > close/open on the index at a minimum. Is there any other way to make those  
> > > > synonym changes real-time (i.e. cache flush of some sort)?
> > > > 
> > > > On Wednesday, May 9, 2012 6:45:18 PM UTC-5, my3sons wrote:
> > > > 
> > > > > Hello,
> > > > > 
> > > > > While doing some testing with query side synonyms and boosts, I am  
> > > > > noticing that the boosts do not seem to be honored for synonym derived  
> > > > > keywords. For example, if I have defined a boost when the keyword is "ipad"  
> > > > > and I have also defined a synonym where "i pad" =\> "ipad", if then submit a  
> > > > > search with "i pad" as my keyword, I do see that the synonym fired  
> > > > > accordingly, but the boost I have for ipad is not honored. Is there anyway  
> > > > > to leverage both the synonym and boost, without having to duplicate all my  
> > > > > boosts across the synonym terms, as we will have thousands of synonyms.
> > > > > 
> > > > > I would be curious to know how ES implements synonyms under the hood.
> > > > > 
> > > > > Thanks!

---

<div class="post-metadata">

### Author: ![vaniaravinda](https://avatars.discourse-cdn.com/v4/letter/v/7993a0/32.png) [@vaniaravinda](https://discuss.elastic.co/u/vaniaravinda)
#### Post date: [June 7, 2016, 4:59am UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/11 "2016-06-07T04:59:09Z")

</div>

Hi,

Synonym search is working sometimes and not working sometimes. I'm not able to find the root cause of that.  
I'm using synonym at search analyzer. Earlier what all the synonym related records got score is different from now.

Can someone help me in understanding the issue.

Thanks,  
@vaniaravinda

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:45pm UTC](https://discuss.elastic.co/t/query-side-synonyms-and-boosts/7624/12 "2017-07-05T22:45:47Z")

</div>


