Hi all,

I'm still trying to make sense of "everything API" Solr 9 and finding The Fine Manual a bit sketchy.

Given a handler that returns multiple facets by default:
```
<str name="facet.mincount">1</str>
<str name="facet.limit">8</str>
<str name="facet.field">subject</str>
<str name="facet.field">country</str>
<str name="facet.field">state</str>
<str name="facet.field">county</str>
<str name="facet.field">community</str>
<str name="facet.field">decade</str>
```
exactly what Solr's add-requesthandler "JSON" should look like?

I've JSON in quotes because last I looked Solr allowed duplicate keys and this may be Solr-valid:
```
{
  "facet.mincount" : 1,
  "facet.limit" : 8,
  "facet.field" : "subject",
  "facet.field" : "country",
...
}
```
Or should it be JSON-proper:
```
{
  "facet.mincount" : 1,
  "facet.limit" : 8,
  "facet.field" : ["subject", "country", ... ]
}
```
???

What about this little gem:
```
<lst name="defaults">
...
<!-- define this since you reference it -->
    <str name="BOOST_BF"></str>
</lst>
<lst name="invariants">
    <str name="q">
    (
          /* parent matches */
          _query_:"{!edismax
            qf=$BOOST_QF
            pf=$BOOST_PF
            pf2=$BOOST_PF2
            pf3=$BOOST_PF3
            pf4=$BOOST_PF4
            ps=$ps
            ps2=$ps2
            ps3=$ps3
            ps4=$ps4
            bq=$BOOST_BQ
            bf=$BOOST_BF
            v=$search_params}"
    OR
          /* child matches -> return + score parent */
          _query_:"{!parent which=is_child:false score=max}
            (
            is_child:true AND {!edismax
              qf=$BOOST_QF
              pf=$BOOST_PF
              pf2=$BOOST_PF2
              pf3=$BOOST_PF3
              pf4=$BOOST_PF4
              ps=$ps
              ps2=$ps2
              ps3=$ps3
              ps4=$ps4
              bq=$BOOST_BQ
              bf=$BOOST_BF
              v=$search_params}
            )"^0.5
     )
    </str>
</lst>
```
What would that look like: `"BOOST_BF":null` in the defaults and `"q":"that-whole-thing-in-one-long-string-with-quotes-escaped-with-backslashes"` in the invariants?

Any ideas?

Or can I just POST 'Content-Type: text/xml' to some API endpoint?

TIA
(I haven't had a chance to play more with security.json, BTW, it's still on my todo list)

DIma


Reply via email to