See the TransportSearchAction, in the doExecute() method, the SearchRequest
is dispatched to several transport actions of the search types.

Assuming you write your own custom action: the shard level request
is ShardSearchRequest. It is easier to add information to SearchRequest,
pass it down, and extract relevant parts from the SearchRequest later. See
ShardSearchRequest constructor for repacking the parameters and delegate it
to a shard.

Maybe it is possible to add info to extrasource.

Jörg

On Mon, Sep 15, 2014 at 8:57 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch <elasticsearch@googlegroups.com> wrote:

> Hi,
>
>
> I am looking through the sources, and I am not sure whether this is
> possible. What I am looking to is the possibility to manipulate the
> SearchRequest object when it reaches the SearchShards level.
> Since I need to update the object with some value that is shard specific.
>
> For this, I was checking the TransportBroadcastOperationAction which
> actually allows to hit multiple shards and we can inject a SearchService.
> However, in the response aggregation, we may have to write our own logic to
> call SearchPhaseController::merge() or something. Not sure if this will be
> a problem when the same code in ElasticSearch changes over releases.
>
> There are also other classes like SearchServiceTransportAction and we can
> also probably extend TransportSearchTypeAction like the other QAF, DFS_QAF,
> QTF, DFS_QTF, etc. However, what I want to know is whether this is standard
> practice and should be done this way? Or is there any other plugin that
> allows me to do this?
>
>
> Thanks,
> Sandeep
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/e1f52da2-bb05-4005-bf88-8031f5440225%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/e1f52da2-bb05-4005-bf88-8031f5440225%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGMr6K81CSWid1%2BoPP_fZ6i1_4J%2B0uNXHuqjCkVB5MXWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to