Based on similar unexpected formatting elsewhere in the code base (in the past) and a quick look at the code I would guess that https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.9.0/solr/core/src/java/org/apache/solr/handler/tagger/TaggerRequestHandler.java#L191 allocating SimpleOrderedMap instead of NamedList might give the proposed change.
From: dev@solr.apache.org At: 08/29/21 16:54:53 UTC+1:00To: dev@solr.apache.org Subject: Re: Tagger Handler response format - change proposition How about the json.nl parameter? That ought to control how this outputs. On Sun, Aug 29, 2021, 10:49 Eric Pugh <ep...@opensourceconnections.com> wrote: Interesting change, and yes, that makes sense to me. Would love to see a PR. On Aug 28, 2021, at 3:32 AM, Łukasz Sokołowski <lukasz.sokolow...@xtech.pl> wrote: Hi, Forgive me using this channel but I didn’t find better place to ask and eventually propose the change below. I’m just implementing content tagging with use of Solr Tagger Handler and I’m wondering why “tags” in Tagger response is an array of arrays instead of array of objects? As in example from https://solr.apache.org/guide/8_7/the-tagger-handler.html { "responseHeader":{ "status":0, "QTime":1}, "tagsCount":1, "tags":[[ "startOffset",6, "endOffset",19, "ids",["5128581"]]], "response":{"numFound":1,"start":0,"docs":[ { "id":"5128581", "name":["New York City"], "countrycode":["US"]}] }} Wouldn’t it be more intuitive and easy to use: … "tags":[{ "startOffset":6, "endOffset":19, "ids":["5128581"]}],… Best regards, Łukasz Sokołowski _______________________ Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com | My Free/Busy Co-Author: Apache Solr Enterprise Search Server, 3rd Ed This e-mail and all contents, including attachments, is considered to be Company Confidential unless explicitly stated otherwise, regardless of whether attachments are marked as such.