Solr 7 returns JSON by default but fts_solr requires XML. Would be good to have wt=xml added to the query to force it to xml all the time, this would prevent errors if solr has not had xml set as default for index. Dovecot 2.2.36 Centos 6 *Doveadm Request:* doveadm search -u caroline at covermg.com TEXT smith doveadm(caroline at covermg.com): Error: fts_solr: Invalid XML input at 1:0: not well-formed (invalid token) (near: { ? "responseHeader":{ ??? "status":0, ??? "QTime":0, ??? "params":{ ????? "q":"{!lucene q.op=AND}(hdr:smith OR body:smith)", ? ) doveadm(caroline at covermg.com): Error: fts_solr: Invalid XML input at 1:0: not well-formed (invalid token) (near: { ? "responseHeader":{ ??? "status":0, ??? "QTime":0, ??? "params":{ ????? "q":"box:1065b22d6b02185bd40f0000d09efc50 AND user:ca) *TCP Dump* Content-Type: application/json;charset=utf-8 Content-Length: 329 { ? "responseHeader":{ ??? "status":0, ??? "QTime":1, ??? "params":{ ????? "q":"{!lucene q.op=AND}from:smith", ????? "fl":"uid,score", ????? "sort":"uid asc", ????? "fq":"+box:b571472154d7035b4e250000d09efc50 +user:caroline at covermg.com", ????? "rows":"69235"}}, ? "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[] ? }} -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180607/a83e2bc7/attachment.html>
On 07.06.2018 17:35, Ricardo Branco wrote:> > Solr 7 returns JSON by default but fts_solr requires XML. > > Would be good to have wt=xml added to the query to force it to xml all > the time, this would prevent errors if solr has not had xml set as > default for index. > > > Dovecot 2.2.36 > Centos 6 > > *Doveadm Request:* > > doveadm search -u caroline at covermg.com TEXT smith > > doveadm(caroline at covermg.com): Error: fts_solr: Invalid XML input at > 1:0: not well-formed (invalid token) (near: { > ? "responseHeader":{ > ??? "status":0, > ??? "QTime":0, > ??? "params":{ > ????? "q":"{!lucene q.op=AND}(hdr:smith OR body:smith)", > ? ) > doveadm(caroline at covermg.com): Error: fts_solr: Invalid XML input at > 1:0: not well-formed (invalid token) (near: { > ? "responseHeader":{ > ??? "status":0, > ??? "QTime":0, > ??? "params":{ > ????? "q":"box:1065b22d6b02185bd40f0000d09efc50 AND user:ca) > > > *TCP Dump* > > Content-Type: application/json;charset=utf-8 > Content-Length: 329 > > { > ? "responseHeader":{ > ??? "status":0, > ??? "QTime":1, > ??? "params":{ > ????? "q":"{!lucene q.op=AND}from:smith", > ????? "fl":"uid,score", > ????? "sort":"uid asc", > ????? "fq":"+box:b571472154d7035b4e250000d09efc50 > +user:caroline at covermg.com", > ????? "rows":"69235"}}, > ? "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[] > ? }} >Thanks for reporting this. Aki -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20180611/093da191/attachment.html>
On 2018-06-07, Ricardo Branco <ricardo.branco at wenn.com> wrote:> Solr 7 returns JSON by default but fts_solr requires XML. > > Would be good to have wt=xml added to the query to force it to xml all the time, this would prevent errors if solr has > not had xml set as default for index.This is already done in Dovecot 2.3.x, the same patch works in 2.2.x. https://github.com/dovecot/core/commit/f987ef0632fc.patch
> On 30 June 2018 at 05:54 Stuart Henderson <stu at spacehopper.org> wrote: > > > On 2018-06-07, Ricardo Branco <ricardo.branco at wenn.com> wrote: > > Solr 7 returns JSON by default but fts_solr requires XML. > > > > Would be good to have wt=xml added to the query to force it to xml all the time, this would prevent errors if solr has > > not had xml set as default for index. > > This is already done in Dovecot 2.3.x, the same patch works in 2.2.x. > > https://github.com/dovecot/core/commit/f987ef0632fc.patch > >You can also configure SOLR to use XML instead of JSON by default. Aki