# Marking document as "not searchable", is it possible?

**URL:** https://discuss.elastic.co/t/marking-document-as-not-searchable-is-it-possible/15778
**Category:** Elasticsearch
**Created:** [February 13, 2014, 2:33pm UTC](https://discuss.elastic.co/t/marking-document-as-not-searchable-is-it-possible/15778 "2014-02-13T14:33:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anon44344346](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@anon44344346](https://discuss.elastic.co/u/anon44344346)
#### Post date: [February 13, 2014, 2:33pm UTC](https://discuss.elastic.co/t/marking-document-as-not-searchable-is-it-possible/15778/1 "2014-02-13T14:33:38Z")

</div>

I want documents who has certain field/value pairs ("availability: 0"), not  
to be "searchable".

There's one solution provided by Igor, which is to use an alias. We set an  
alias with the index name and a filter requiring availibity \> 0 , and we  
make all our search queries to that alias. But I like to know if there's  
anyway to tell "ES to "not even look at" those documents. More or less like  
the "index:no" option when defining a field mapping, but on a document  
level.

I've pursuing this because I think there's a performance gain here, maybe  
there's not? an alias with a numeric filter is as performant as this "not  
searchable document" solution would be???

txs

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/20714f9a-a79b-4c62-9439-780c33f18e56%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/20714f9a-a79b-4c62-9439-780c33f18e56%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [February 13, 2014, 11:37pm UTC](https://discuss.elastic.co/t/marking-document-as-not-searchable-is-it-possible/15778/2 "2014-02-13T23:37:26Z")

</div>

Filters are super fast to apply, especially when cached. I wouldn't worry  
about the cost of applying a filter.

On Thu, Feb 13, 2014 at 3:33 PM, JoeZ99 [jzarate@gmail.com](mailto:jzarate@gmail.com) wrote:

> I want documents who has certain field/value pairs ("availability: 0"),  
> not to be "searchable".
> 
> There's one solution provided by Igor, which is to use an alias. We set an  
> alias with the index name and a filter requiring availibity \> 0 , and we  
> make all our search queries to that alias. But I like to know if there's  
> anyway to tell "ES to "not even look at" those documents. More or less like  
> the "index:no" option when defining a field mapping, but on a document  
> level.
> 
> I've pursuing this because I think there's a performance gain here, maybe  
> there's not? an alias with a numeric filter is as performant as this "not  
> searchable document" solution would be???
> 
> txs
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/20714f9a-a79b-4c62-9439-780c33f18e56%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/20714f9a-a79b-4c62-9439-780c33f18e56%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
Adrien Grand

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5L4Kv1NGH4h\_FNyw8-yjiqL4xKfs0347ApCeyMwLFHsQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j5L4Kv1NGH4h_FNyw8-yjiqL4xKfs0347ApCeyMwLFHsQ%40mail.gmail.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, 1:50am UTC](https://discuss.elastic.co/t/marking-document-as-not-searchable-is-it-possible/15778/3 "2017-07-06T01:50:19Z")

</div>


