Here are some null handling examples: https://solr.apache.org/guide/solr/latest/query-guide/transform.html#handling-nulls
Joel Bernstein http://joelsolr.blogspot.com/ On Tue, Jul 5, 2022 at 4:44 PM Kojo <[email protected]> wrote: > I found this e-mail archive > https://lists.apache.org/thread/vk3o0zz1w4grcj2chfqcwg8twg8t08gc that > seems > to be related to this issue, but I did not found any Jira ticket or any > other comment. > > Can you give me some advice? > > Em seg., 4 de jul. de 2022 às 22:24, Kojo <[email protected]> escreveu: > > > I cannot check equality against null in Solr 9.0. It always raise > > exception. IE: > > > > having( > > STREAM > > eq(any_valid_field, null)) > > > > "EXCEPTION": "Unable to check eq(...) because a null value was found" > > > > Does the statement below changed in Solr 9.0? > > > > Thanks! > > > > if Syntax > > < > https://solr.apache.org/guide/8_4/stream-evaluator-reference.html#if-syntax > > > > > > The expressions below show the various ways in which you can use the if > > evaluator. > > > > if(fieldA,fieldB,fieldC) // if fieldA is true then fieldB else fieldC > > if(gt(fieldA,5), fieldA, 5) // if fieldA > 5 then fieldA else 5 > > if(eq(fieldB,null), null, div(fieldA,fieldB)) // if fieldB is null then > null else fieldA / fieldB > > > > >
