alessandrobenedetti commented on code in PR #5328:
URL: https://github.com/apache/solr/pull/5328#discussion_r4722067919
##########
solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java:
##########
@@ -769,8 +788,62 @@ public Set<String> getNonStoredDVsWithoutCopyTargets() {
return nonStoredDVsWithoutCopyTargets;
}
+ public Set<String> calcRawVectorFieldsForReturn(ReturnFields returnFields) {
+ if (derivedStoredVectorFields.isEmpty()) {
+ return Set.of();
+ }
+
+ if (returnFields.returnsAllFields()) {
+ return new HashSet<>(derivedStoredVectorFields);
+ }
+
+ if (returnFields.hasPatternMatching()) {
+ return
derivedStoredVectorFields.stream().filter(returnFields::loadsField).collect(toSet());
+ } else {
+ return ofNullable(returnFields.getLuceneFieldNames())
+ .map(fields ->
fields.stream().filter(derivedStoredVectorFields::contains))
+ .orElseGet(() ->
derivedStoredVectorFields.stream().filter(returnFields::loadsField))
+ .collect(Collectors.toSet());
+ }
+ }
+
+ public void decorateWithRawVectorFields(
+ SolrDocument sdoc, int luceneDocId, Set<String> vectorFieldNames) throws
IOException {
Review Comment:
Hi David, we are spending some time with Andrea, and we agreed that renaming
it to SolrDocument toDecorate is more readable than SolrDocument sdoc (which is
basically just repeating the name of the type, and removing some letters, so
less readable).
Let us know if ou any strong reason for not making it this way
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]