alessandrobenedetti 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_r376503587
########## File path: lucene/core/src/java/org/apache/lucene/util/QueryBuilder.java ########## @@ -509,33 +549,40 @@ protected Query analyzeGraphBoolean(String field, TokenStream source, BooleanCla end = articulationPoints[i]; } lastState = end; - final Query queryPos; + final Query positionalQuery; if (graph.hasSidePath(start)) { - final Iterator<TokenStream> it = graph.getFiniteStrings(start, end); + final Iterator<TokenStream> sidePathsIterator = graph.getFiniteStrings(start, end); Iterator<Query> queries = new Iterator<Query>() { @Override public boolean hasNext() { - return it.hasNext(); + return sidePathsIterator.hasNext(); } @Override public Query next() { - TokenStream ts = it.next(); - return createFieldQuery(ts, BooleanClause.Occur.MUST, field, getAutoGenerateMultiTermSynonymsPhraseQuery(), 0); + TokenStream sidePath = sidePathsIterator.next(); + return createFieldQuery(sidePath, BooleanClause.Occur.MUST, field, getAutoGenerateMultiTermSynonymsPhraseQuery(), 0); } }; - queryPos = newGraphSynonymQuery(queries); + positionalQuery = newGraphSynonymQuery(queries); } else { - Term[] terms = graph.getTerms(field, start); + List<AttributeSource> attributes = graph.getTerms(start); Review comment: a tentative change is coming in the next commit, I added also few tests to cover that else coding branch ---------------------------------------------------------------- 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