we are upgrading our Elastic from 5.2.2 to 6.2.1 but we have a problem with our search requests.
We use nest to communicate with our code. We use JSonConverters in our customserialization to read jsons and convert them to objects. With the 5.2.2 driver we could easily access the indexname with from the JsonReader.
In 5.2.2 we could cast the JSonReader to JTokenReader and call something like "reader.CurrentToken.Parent["_index"], but now this has become a JSonTextReader which, if i am not mistaking, makes it impossible to call the parent, we can only access the source.
Is there a way to get the index back in the response in our JSonConverter?
I can't see an easy way of doing this with 6.x by navigating up the AST from _source inside of the SourceSerializer, as the serializer is passed only the stream containing the _source JSON when using your own configured SourceSerializer such as JsonNetSerializer.
Would using SearchResponse.Hits that exposes the _index along with each _source document work?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.