Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-15391: Enable 'canUsePoints' for PointFields in Solr #2488

Draft
wants to merge 1 commit into
base: branch_8x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion solr/core/src/java/org/apache/solr/schema/PointField.java
Expand Up @@ -298,7 +298,10 @@ public List<IndexableField> createFields(SchemaField sf, Object value) {

@Override
public SortField getSortField(SchemaField field, boolean top) {
return getNumericSort(field, getNumberType(), top);
SortField sf = getNumericSort(field, getNumberType(), top);
// if indexed=true, points can be used for skipping over non competitive docs.
sf.setCanUsePoints();
return sf;
}

}
Expand Up @@ -1509,7 +1509,6 @@ private TopDocsCollector buildTopDocsCollector(int len, QueryCommand cmd) throws
// we have a sort
final Sort weightedSort = weightSort(cmd.getSort());
final CursorMark cursor = cmd.getCursorMark();

final FieldDoc searchAfter = (null != cursor ? cursor.getSearchAfterFieldDoc() : null);
return TopFieldCollector.create(weightedSort, len, searchAfter, minNumFound);
}
Expand Down