diegoceccarelli commented on a change in pull request #357: [SOLR-12238] 
Synonym Queries boost by payload 
URL: https://github.com/apache/lucene-solr/pull/357#discussion_r370941581
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java
 ##########
 @@ -509,38 +591,75 @@ protected Query analyzeGraphBoolean(String field, 
TokenStream source, BooleanCla
         end = articulationPoints[i];
       }
       lastState = end;
-      final Query queryPos;
+      final Query queryClause;
+      final Iterator<TokenStream> sidePathsForPayloads = 
graph.getFiniteStrings(start, end);
+      Iterator<BytesRef[]> sidePathsPayloads = new Iterator<BytesRef[]>() {
+        @Override
+        public boolean hasNext() {
+          return sidePathsForPayloads.hasNext();
+        }
+
+        @Override
+        public BytesRef[] next() {
+          TokenStream sidePath = sidePathsForPayloads.next();
+          return getPayloadsFromStream(sidePath);
+        }
+      };
       if (graph.hasSidePath(start)) {
-        final Iterator<TokenStream> it = graph.getFiniteStrings(start, end);
-        Iterator<Query> queries = new Iterator<Query>() {
+        final Iterator<TokenStream> sidePaths = graph.getFiniteStrings(start, 
end);
 
 Review comment:
   nit: maybe keep iterator in the name? `sidePathsIterator`? 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to