[
https://issues.apache.org/jira/browse/SOLR-8858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15353771#comment-15353771
]
Caleb Rackliffe commented on SOLR-8858:
---------------------------------------
After applying myself on master, the {{doc}} method looks like this:
{noformat}
@Override
public Document doc(int i, Set<String> fields) throws IOException {
Document d;
if (documentCache != null) {
d = documentCache.get(i);
if (d != null) return d;
}
final DirectoryReader reader = getIndexReader();
if (fields != null) {
if (enableLazyFieldLoading) {
final SetNonLazyFieldSelector visitor = new
SetNonLazyFieldSelector(fields, reader, i);
reader.document(i, visitor);
d = visitor.doc;
} else {
d = reader.document(i, fields);
}
} else {
d = reader.document(i);
}
if (documentCache != null) {
documentCache.put(i, d);
}
return d;
}
{noformat}
Running the tests (i.e. {{ant test -Dtests.slow=false}}), I get:
{noformat}
[junit4] Tests with failures [seed: BB0B954A8C44DF29]:
[junit4] -
org.apache.solr.response.transform.TestSubQueryTransformer.testTwoSubQueriesAndByNumberWithTwoFields
[junit4] -
org.apache.solr.response.transform.TestSubQueryTransformer.testJustJohnJavabin
[junit4] -
org.apache.solr.response.transform.TestSubQueryTransformer.testJustJohnJson
[junit4] -
org.apache.solr.response.transform.TestSubQueryTransformer.testJohnOrNancySingleField
[junit4] -
org.apache.solr.response.transform.TestSubQueryTransformer.testThreeLevel
[junit4] - org.apache.solr.cloud.DistribJoinFromCollectionTest.testScore
[junit4] - org.apache.solr.cloud.DistribJoinFromCollectionTest.testNoScore
[junit4] - org.apache.solr.cloud.TestCloudDeleteByQuery (suite)
[junit4]
[junit4]
[junit4] JVM J0: 0.58 .. 415.88 = 415.29s
[junit4] JVM J1: 0.58 .. 415.81 = 415.23s
[junit4] JVM J2: 0.58 .. 415.88 = 415.30s
[junit4] JVM J3: 0.58 .. 415.72 = 415.13s
[junit4] Execution time total: 6 minutes 56 seconds
[junit4] Tests summary: 616 suites (10 ignored), 2584 tests, 1 suite-level
error, 4 errors, 3 failures, 279 ignored (258 assumptions)
{noformat}
I'm going to dig into these a bit and see if using the {{fields}} set broke
some assumptions somewhere...
> SolrIndexSearcher#doc() Completely Ignores Field Filters Unless Lazy Field
> Loading is Enabled
> ---------------------------------------------------------------------------------------------
>
> Key: SOLR-8858
> URL: https://issues.apache.org/jira/browse/SOLR-8858
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.6, 4.10, 5.5
> Reporter: Caleb Rackliffe
> Labels: easyfix
>
> If {{enableLazyFieldLoading=false}}, a perfectly valid fields filter will be
> ignored, and we'll create a {{DocumentStoredFieldVisitor}} without it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]