mkhludnev commented on a change in pull request #1151: SOLR-13890: Add 
"top-level" DVTQ implementation
URL: https://github.com/apache/lucene-solr/pull/1151#discussion_r363774049
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/search/TermsQParserPlugin.java
 ##########
 @@ -138,8 +164,128 @@ public Query parse() throws SyntaxError {
           bytesRefs[i] = term.toBytesRef();
         }
 
-        return method.makeFilter(fname, bytesRefs);
+        return method.makeFilter(fname, bytesRefs, localParams);
       }
     };
   }
+
+  private static abstract class TopLevelTwoPhaseIterator extends 
TwoPhaseIterator {
+    private final int docBase;
+    private final int nextDocBase;
+    public TopLevelTwoPhaseIterator(DocIdSetIterator approximation, int 
docBase, int nextDocBase) {
+      super(new PerSegmentViewDocIdSetIterator(approximation, docBase, 
nextDocBase));
+
+      this.docBase = docBase;
+      this.nextDocBase = nextDocBase;
+    }
+  }
+
+  private static class TopLevelDocValuesTermsQuery extends DocValuesTermsQuery 
implements ExtendedQuery{
+    private final String fieldName;
+    private SortedSetDocValues values;
+    private LongBitSet queryTermOrdinals;
+    private boolean matchesAtLeastOneTerm = false;
+    private boolean cache = true;
+    private boolean cacheSeparately = false;
+    private int cost;
+
+
+    public TopLevelDocValuesTermsQuery(String field, BytesRef... terms) {
+      super(field, terms);
+      this.fieldName = field;
+    }
+
+    public Weight createWeight(IndexSearcher searcher, final ScoreMode 
scoreMode, float boost) throws IOException {
+      values = 
DocValues.getSortedSet(((SolrIndexSearcher)searcher).getSlowAtomicReader(), 
fieldName);
 
 Review comment:
   Another naming proposal is ```global_ordinals```.
    

----------------------------------------------------------------
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