Re: LTR - FieldValueFeature Question

2020-04-26 Thread Dmitry Paramzin
It seems that in order to be available for FieldValueFeature score calculation, 
the field should be 'stored', otherwise it is not present in the document. It 
is also seems that indexed/docValue does not matter:

  final IndexableField indexableField = document.getField(field);
  if (indexableField == null) {
return getDefaultValue();
  }

On 2020/04/24 06:39:30, Ashwin Ramesh  wrote: 
> Hi everybody,
> 
> Do we need to have 'indexed=true' to be able to retrieve the value of a
> field via FieldValueFeature or is having docValue=true enough?
> 
> Currently, we have some dynamic fields as [dynamicField=true, stored=false,
> indexed=false, docValue=true]. However when we noticing that the value
> extracted is '0.0'.
> 
> This is the code I read around FieldFeatureValue:
> https://github.com/apache/lucene-solr/blob/master/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/FieldValueFeature.java
> 
> Thanks,
> 
> Ash
> 
> -- 
> **
> ** Empowering the world to design
> Share accurate 
> information on COVID-19 and spread messages of support to your community.
> 
> Here are some resources 
> 
>  
> that can help.
>    
>    
>     
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


LTR - FieldValueFeature Question

2020-04-23 Thread Ashwin Ramesh
Hi everybody,

Do we need to have 'indexed=true' to be able to retrieve the value of a
field via FieldValueFeature or is having docValue=true enough?

Currently, we have some dynamic fields as [dynamicField=true, stored=false,
indexed=false, docValue=true]. However when we noticing that the value
extracted is '0.0'.

This is the code I read around FieldFeatureValue:
https://github.com/apache/lucene-solr/blob/master/solr/contrib/ltr/src/java/org/apache/solr/ltr/feature/FieldValueFeature.java

Thanks,

Ash

-- 
**
** Empowering the world to design
Share accurate 
information on COVID-19 and spread messages of support to your community.

Here are some resources 

 
that can help.