Dear Solr Masters, I am using the LTR functionality with Solr, and it works beautifully. I have a nice catch-all query at the beginning, then I am recalculating the score with LTR. And I have already learned some nice tricks. but there is something that I still cannot do. I need to create LTR model features, that will operate on children document properties.
Part of my doc structure: <doc> <field name="id">b0001</field> <field name="type">record</field> <field name="gender">male</field> <field name="fullName">Krzysztof Kowalski</field> <doc> <field name="id">d1e12</field> <field name="type">name</field> <field name="name_type">alias</field> <field name="name_fullName">Chris Kowalski</field> </doc> <doc> <field name="id">d1e18</field> <field name="type">name</field> <field name="name_type">spelling</field> <field name="name_fullName">Krzysiek Kowalski</field> </doc> </doc> What is pretty easy: 1. return strdist() between the given ${fullNameParam} and field 'fullName' { "store": "myStore", "name": "scoreFullName", "class": "org.apache.solr.ltr.feature.SolrFeature", "params":{ "q": "{!func}strdist(\"${fullNameParam}\",fullName,edit)" } } 2. I may also execute conditional evaluation, but only on top level document attributes. But what I do not know how to achieve is: * return max(strdist()) of the given $fullNameParam against field 'name_fullName' in all children documents (type='name')* I need max() because there may be several children documents, I only need to find the top matching one. No, synonyms do not fit here. The example with names above is only a part of my data, there are other cases. Can this be done? How? I am returning the top level documents, where type='record'. But do not know how to achieve children evaluation result, where there may be many children documents. I've tried parent and child block join, with no luck. Best regards, Dariusz Wojtas