lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Magnus Ebbesson <>
Subject JSON-B deserialization of Solr-response with highlightning
Date Thu, 23 Nov 2017 11:30:04 GMT

We're started to migrate our integration-framework to move over to JavaEE JSON-B as default
json-serialization /deserialization framework and now the highlighning component is giving
us some troubles. Here's a constructed example of the JSON response from Solr.

        "title":"some text.. Queryword some more text..",
      "title":["some text.. <b>queryword</b>.. some more text"]}



The JSON-B Spec (JSR- 367 Java API for JSON Binding ("Specification") Version: 1.0) specifically
details that when JSON Binding implementation during deserialization encounters key in key/value
pair that it does not recognize, it should treat the rest of the JSON document as if the element
simply did not appear, and in particular, the implementation MUST NOT treat this as an error

docId_0 being a dynamic key for the highlighting-response we're unable to pick up and with
doc-ids being totally dynamic, creating any kind of known mapping for an object isn't feasible.

Are there any ideas on how to solve this without having to implement a custom-parser into
our framework for this specific use case?

Solr-J has been ruled previously due to policies and we've used Jackson Any-type in the previous
version of the framework, but it has been now been replaced by JSON-B standards..


Magnus Ebbesson

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message