You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Christine Poerschke (Jira)" <ji...@apache.org> on 2021/05/27 10:54:00 UTC
[jira] [Commented] (SOLR-15440) contrib/ltr FieldValueFeature:
DocValues use for stored fields
[ https://issues.apache.org/jira/browse/SOLR-15440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352391#comment-17352391 ]
Christine Poerschke commented on SOLR-15440:
--------------------------------------------
Sketched out below is one way this could be done in terms of code. It's a code fragment sketch only i.e. test coverage and documentation updates in javadoc/CHANGES.txt/Solr Ref Guide/etc. would of course all also be required especially since it's a not backwards compatible change.
{code:java}
public class FieldValueFeature extends Feature {
+ @Deprecated
+ final private boolean useDocValuesForStored;
public FieldValueFeature(String name, Map<String,Object> params) {
super(name, params);
+ this.useDocValuesForStored = true;
}
+ @Deprecated
+ protected FieldValueFeature(String name, Map<String,Object> params, boolean useDocValuesForStored) {
+ super(name, params);
+ this.useDocValuesForStored = useDocValuesForStored;
+ }
...
public FeatureScorer scorer(LeafReaderContext context) throws IOException {
if (schemaField != null &&
- !schemaField.stored() &&
+ (!schemaField.stored() || useDocValuesForStored) &&
schemaField.hasDocValues()) {
...
}
...
}
@Deprecated // will be removed in Solr 9.X or Solr 10
final public class LegacyFieldValueFeature extends FieldValueFeature {
public LegacyFieldValueFeature(String name, Map<String,Object> params) {
super(name, params, false /* useDocValuesForStored */);
}
}
{code}
> contrib/ltr FieldValueFeature: DocValues use for stored fields
> --------------------------------------------------------------
>
> Key: SOLR-15440
> URL: https://issues.apache.org/jira/browse/SOLR-15440
> Project: Solr
> Issue Type: Improvement
> Components: contrib - LTR
> Reporter: Christine Poerschke
> Priority: Major
>
> SOLR-12697 in Solr 8.9 is intending to add {{FieldValueFeature}} support "stored=false docValues=true" a.k.a. pure DocValues fields.
> The SOLR-12697 changes are implemented in a backwards compatible manner i.e. existing behaviour for "stored=trued docValues=true" a.k.a. stored DocValues fields does not change.
> This ticket here is to explore how backwards compatibility could potentially be broken (in a safe manner) in future e.g.
> * Solr 9.0 breaks backwards compatibility for {{FieldValueFeature}} but provides a deprecated {{LegacyFieldValueFeature}} with the existing behaviour for users who need that.
> * Solr 9.X or 10.0 removes the deprecated {{LegacyFieldValueFeature}} class and users still needing the legacy behaviour need to create and maintain an equivalent local custom class.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org