You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Benjamin Armintor <ar...@gmail.com> on 2023/06/23 14:39:43 UTC

Changes to JSON query API/syntax in Solr 9.x?

Hello,

I work on a software project that uses Solr. We are observing that JSON
queries that worked in Solr 8.11 no longer appear to be working on Solr 9.0
or later (using Docker images). Our project constructs these queries
programatically, but simply pasting a JSON query into the admin UI:

{
  "query": {
    "bool": {
      "must": [
        {
          "edismax": {"query": "medicine", "qf": "title_tsim"}
        }
      ]
    }
  }
}

Returns results in Solr 8 and nothing in Solr 9 with the same set of
documents indexed. I am digging into our Solr configurations, but wanted to
ask whether there were documented changes in Solr 9 I might be missing that
would affect this type of query. Does this sound familiar to anyone?

Re: Changes to JSON query API/syntax in Solr 9.x?

Posted by Shawn Heisey <ap...@elyograg.org>.
On 6/23/23 12:24, Benjamin Armintor wrote:
> Continuing to investigate: The solrconfig for this core sets a default
> defType of "edismax".
> 
> The above query works via the admin UI in v9.2.1 if I explicitly set the
> request defType to "lucene".
> 
> It does NOT work if I set the defType to "edismax" or leave it blank
> ("-----" in the UI).

That would indicate that you have changed the defType in solrconfig.xml 
for the handler, which is most likely named "/select".

The defType parameter defaults to "lucene" so it sounds like you have 
explicitly set that to "edismax" in solrconfig.xml on the 9.x version. 
I have verified on my own 9.x install that the current default is still 
lucene.

Thanks,
Shawn

Re: Changes to JSON query API/syntax in Solr 9.x?

Posted by Benjamin Armintor <ar...@gmail.com>.
Continuing to investigate: The solrconfig for this core sets a default
defType of "edismax".

The above query works via the admin UI in v9.2.1 if I explicitly set the
request defType to "lucene".

It does NOT work if I set the defType to "edismax" or leave it blank
("-----" in the UI).

On Fri, Jun 23, 2023 at 10:39 AM Benjamin Armintor <ar...@gmail.com>
wrote:

> Hello,
>
> I work on a software project that uses Solr. We are observing that JSON
> queries that worked in Solr 8.11 no longer appear to be working on Solr 9.0
> or later (using Docker images). Our project constructs these queries
> programatically, but simply pasting a JSON query into the admin UI:
>
> {
>   "query": {
>     "bool": {
>       "must": [
>         {
>           "edismax": {"query": "medicine", "qf": "title_tsim"}
>         }
>       ]
>     }
>   }
> }
>
> Returns results in Solr 8 and nothing in Solr 9 with the same set of
> documents indexed. I am digging into our Solr configurations, but wanted to
> ask whether there were documented changes in Solr 9 I might be missing that
> would affect this type of query. Does this sound familiar to anyone?
>
>
>