agazzarini commented on code in PR #5328:
URL: https://github.com/apache/solr/pull/5328#discussion_r4658624847
##########
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:
Honestly, the method name looks confusing to me. That's why I added
decorate*With*RawVectorFields. I reverted the change to keep the naming
uniform, but the name is still unclear to me. What do you propose?
_decorateDocumentWithRawVectorFields_? In that case, we should also unify the
docValues method.
--
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]