# Pessimization selected queries for selected indexes. How?

**URL:** <https://discuss.elastic.co/t/pessimization-selected-queries-for-selected-indexes-how/11948>\
**Category:** Elasticsearch\
**Created:** [May 14, 2013, 7:51am UTC](https://discuss.elastic.co/t/pessimization-selected-queries-for-selected-indexes-how/11948 "2013-05-14T07:51:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Peregudov](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Alexander\_Peregudov](https://discuss.elastic.co/u/Alexander_Peregudov)\
**Post date:** [May 14, 2013, 7:51am UTC](https://discuss.elastic.co/t/pessimization-selected-queries-for-selected-indexes-how/11948/1 "2013-05-14T07:51:05Z")

</div>

Problem:  
I have some indexes: Realty, Electronics, Auto ... Each document have title  
and description. And I'm use full-text search (with morphology) for all  
indexes for title and description.

But, some queries is not relevant for some indexes.

Example:  
"washing machine" is good for Electronics and not so good for Realty.  
Becouse, too many docs in Realty where "washing machine" can be find in  
description: flat for rent with "washing machine" or cottage for sale and  
"washing machine" as a gift.

Question:  
How I can "pessimize" docs that matched to selected queries (dozens) in  
selected indexes? If I search for "washing machine" for all indexes, only  
results from Electronics must be in query results. But, for "flat for rent  
with washing machine" query must give relevant result.

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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 14, 2013, 4:33pm UTC](https://discuss.elastic.co/t/pessimization-selected-queries-for-selected-indexes-how/11948/2 "2013-05-14T16:33:40Z")

</div>

Your situation sounds like something that would be better off solved on the  
client side. If your query is contained in a list of targeted queries, then  
you can restrict the query to a specific index.

If the documents were all in the same index, you can play around with  
boosting, such as boosting all electronic documentations.

--  
Ivan

On Tue, May 14, 2013 at 12:51 AM, Alexander Peregudov \<  
[alexander.peregudov@gmail.com](mailto:alexander.peregudov@gmail.com)\> wrote:

> Problem:  
> I have some indexes: Realty, Electronics, Auto ... Each document have  
> title and description. And I'm use full-text search (with morphology) for  
> all indexes for title and description.
> 
> But, some queries is not relevant for some indexes.
> 
> Example:  
> "washing machine" is good for Electronics and not so good for Realty.  
> Becouse, too many docs in Realty where "washing machine" can be find in  
> description: flat for rent with "washing machine" or cottage for sale and  
> "washing machine" as a gift.
> 
> Question:  
> How I can "pessimize" docs that matched to selected queries (dozens) in  
> selected indexes? If I search for "washing machine" for all indexes, only  
> results from Electronics must be in query results. But, for "flat for rent  
> with washing machine" query must give relevant result.
> 
> 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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:36am UTC](https://discuss.elastic.co/t/pessimization-selected-queries-for-selected-indexes-how/11948/3 "2017-07-06T02:36:45Z")

</div>


