mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
This adds methods to parse InternalSearchHit and InternalSearchHits from their xContent representation. Most of the information in the original object is preserved when rendering the object to xContent and then parsing it back. However, some pieces of information are lost which we currently cannot parse back from the rest response, most notably: * the "match" property of the lucene explanation is not rendered in the "_explain" section and cannot be reconstructed on the client side * the original "shard" information (SearchShardTarget) is only rendered if the "explanation" is also set, also we loose the indexUUID of the contained ShardId because we don't write it out. As a replacement we can use ClusterState.UNKNOWN_UUID on the receiving side