How to get '_node' field for hit without "explain=true"?

Hi All,

Is there some way to get information which node hit come from?

I found that "explain" option can give such info, but there is huge
overhead by unnecessary "_explanation" field.

After source code investigation it is clear that information is come from *
InternalSearchHit.java:*

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params

) throws IOException {
builder.startObject();
if (explanation() != null) {
builder.field("_shard", shard.shardId());
builder.field("_node",* shard.nodeIdText*());
}
...

Is it possible to get info from 'shard' object without code modification?
For example by some script fields?

Best regards,

Artem Shpynov aka FYR

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

As you pointed out, the node and shard information is not reliant on the
explanation info, only the access to the info uses a shared parameter. I
would raise this as an issue on github that the coupling between the two
concepts should be loosen. Perhaps another parameter that does not executes
the somewhat heavyweight processing of the explanation. Useful information
to have. My two cents. :slight_smile:

Cheers,

Ivan

On Wed, Oct 30, 2013 at 11:24 PM, Artem Shpynov ashpynov@gmail.com wrote:

Hi All,

Is there some way to get information which node hit come from?

I found that "explain" option can give such info, but there is huge
overhead by unnecessary "_explanation" field.

After source code investigation it is clear that information is come from
InternalSearchHit.java:

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params

params) throws IOException {
builder.startObject();
if (explanation() != null) {
builder.field("_shard", shard.shardId());
builder.field("_node",* shard.nodeIdText*());
}
...

Is it possible to get info from 'shard' object without code modification?
For example by some script fields?

Best regards,

Artem Shpynov aka FYR

--
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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

Great,

I did it already due to kimchi suggestion. Please update

BR,

Artem

четверг, 31 октября 2013 г., 23:56:00 UTC+4 пользователь Ivan Brusic
написал:

As you pointed out, the node and shard information is not reliant on the
explanation info, only the access to the info uses a shared parameter. I
would raise this as an issue on github that the coupling between the two
concepts should be loosen. Perhaps another parameter that does not executes
the somewhat heavyweight processing of the explanation. Useful information
to have. My two cents. :slight_smile:

Cheers,

Ivan

On Wed, Oct 30, 2013 at 11:24 PM, Artem Shpynov <ashp...@gmail.com<javascript:>

wrote:

Hi All,

Is there some way to get information which node hit come from?

I found that "explain" option can give such info, but there is huge
overhead by unnecessary "_explanation" field.

After source code investigation it is clear that information is come from
InternalSearchHit.java:

@Override
public XContentBuilder toXContent(XContentBuilder builder, Params 

params) throws IOException {
builder.startObject();
if (explanation() != null) {
builder.field("_shard", shard.shardId());
builder.field("_node",* shard.nodeIdText*());
}
...

Is it possible to get info from 'shard' object without code
modification? For example by some script fields?

Best regards,

Artem Shpynov aka FYR

--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.