コード例 #1
0
 public override int Size()
 {
     /*
      * If stuff was removed from the index during this tx and during the same tx a query that matches them is
      * issued, then it is possible to get negative size from the IndexHits result, if exclude is larger than source.
      * To avoid such weirdness, we return at least 0. Note that the iterator will return no results, as it should.
      */
     return(Math.Max(0, _source.size() - _removedInTransactionState.Count));
 }