Hi Sergio,
in the block join, under the hood, nested docs are separate Lucene(Solr
documents).
Assuming you are retrieving parents after querying children (
https://solr.apache.org/guide/solr/latest/query-guide/block-join-query-parser.html#block-join-parent-query-parser)
that's all you got for reranking.
So you can't calculate features on children (which are anyway
separate docs).
It could be a nice contribution though, if you want to work on this, ahppy
to review!

Cheers
--------------------------
*Alessandro Benedetti*
Director @ Sease Ltd.
*Apache Lucene/Solr Committer*
*Apache Solr PMC Member*

e-mail: a.benede...@sease.io


*Sease* - Information Retrieval Applied
Consulting | Training | Open Source

Website: Sease.io <http://sease.io/>
LinkedIn <https://linkedin.com/company/sease-ltd> | Twitter
<https://twitter.com/seaseltd> | Youtube
<https://www.youtube.com/channel/UCDx86ZKLYNpI3gzMercM7BQ> | Github
<https://github.com/seaseltd>


On Mon, 24 Jul 2023 at 12:23, Sergio García Maroto <marot...@gmail.com>
wrote:

> Hi,
>
> I am trying to set up a list of features within LTR.
> I have a collection *"person" *with a design of two levels. I have Person
> documents with nested documetns classified as jobs.
>
> Within the job level I have two fields describing if the job is current and
> recency. I would like to incorporante these two as features.
> Sample of two documents, one for a person an another one for a job.
> { "PersonID":220444495, "NameFullD":"Peter Peter", "_root_":"220444495", "
> type_level":"parent"}, {
> { "type_level":"job", "_root_":"220444495"},
> "IsCurrent":"true"},
>   "*JobEndDate*":"2021-05-30"},
> {
>
> My query runs as a blockjoin query targeting child document job and returns
> people as parent documetns.
> q="({!type=parent which=type_level:parent v='((CompanyNameNSD:ibm) AND
> (type_level:(job)))' score=total} AND type_level:(parent)))"
>
> My question is related to features when related to nested documetns. Is it
> posible to get the feaure value back.
> I tried this way but seems to work only when the query onlt targets
> children documents and gets back chikdren When I introduce {!type=parent
> which=type_level:parent
> then doesn't work. I get back
>
> isCurrentJob=0.0,originalScore=1.7668228"
>
>
> Feature store sample
>  [
>   {
> "store" : "personFeatureStore",
>     "name" : "isCurrentJob",
>     "class" : "org.apache.solr.ltr.feature.SolrFeature",
>     "params" : {
>       "fq": ["{!terms f=PrimaryNS}true"]
>     }
>   },
>   {
> "store" : "personFeatureStore",
>     "name" : "originalScore",
>     "class" : "org.apache.solr.ltr.feature.OriginalScoreFeature",
>     "params" : {}
>   }
> ]
>
>
> Regards,
> Sergio Maroto
>

Reply via email to