You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/03/15 14:46:50 UTC
[GitHub] [solr] dsmiley commented on a change in pull request #18: SOLR-15261: SortedDocValues no longer extends BinaryDocValues
dsmiley commented on a change in pull request #18:
URL: https://github.com/apache/solr/pull/18#discussion_r594394186
##########
File path: solr/core/src/java/org/apache/solr/search/HashQParserPlugin.java
##########
@@ -112,7 +112,7 @@ public LongValues getValues(LeafReaderContext ctx, DoubleValues scores) throws I
@Override
public boolean advanceExact(int doc) throws IOException { atDoc = values.advanceExact(doc); return true; }
@Override
- public long longValue() throws IOException { return atDoc ? values.binaryValue().hashCode() : 0; }
+ public long longValue() throws IOException { return atDoc ? values.lookupOrd(values.ordValue()).hashCode() : 0; }//TODO: SortedDocValues quick fix
Review comment:
```suggestion
public long longValue() throws IOException { return atDoc ? values.lookupOrd(values.ordValue()).hashCode() : 0; }//TODO maybe cache hashCode if same ord as prev doc to save lookupOrd?
```
##########
File path: solr/core/src/java/org/apache/solr/search/join/HashRangeQuery.java
##########
@@ -104,7 +104,7 @@ public float matchCost() {
}
private int hash(SortedDocValues docValues) throws IOException {
- BytesRef bytesRef = docValues.binaryValue();
+ BytesRef bytesRef = docValues.lookupOrd(docValues.ordValue());//TODO: SortedDocValues quick fix
Review comment:
```suggestion
//TODO maybe cache hashCode if same ord as prev doc to save lookupOrd?
BytesRef bytesRef = docValues.lookupOrd(docValues.ordValue());
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org