# Getting Engine.Searcher object within custom plugin

**URL:** <https://discuss.elastic.co/t/getting-engine-searcher-object-within-custom-plugin/12633>\
**Category:** Elasticsearch\
**Created:** [July 3, 2013, 7:43am UTC](https://discuss.elastic.co/t/getting-engine-searcher-object-within-custom-plugin/12633 "2013-07-03T07:43:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [July 3, 2013, 7:43am UTC](https://discuss.elastic.co/t/getting-engine-searcher-object-within-custom-plugin/12633/1 "2013-07-03T07:43:31Z")

</div>

I have created a simple plugin by extending BaseRestHandler. I need to  
access Engine.Searcher and Engine.Reader within plugin class

Is there a way to get these two objects without using IndexShard.searcher()

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](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:28am UTC](https://discuss.elastic.co/t/getting-engine-searcher-object-within-custom-plugin/12633/2 "2017-07-06T02:28:30Z")

</div>


