code: func (f *Filter) indexedLogs(ctx context.Context, end uint64) ([]*types.Log, error) {
  	// Create a matcher session and request servicing from the backend
  	matches := make(chan uint64, 64)
  
  	session, err := f.matcher.Start(ctx, uint64(f.begin), end, matches)
  	if err != nil {
  		return nil, err
  	}
  	defer session.Close()
  
  	f.backend.ServiceFilter(ctx, session)
  
  	// Iterate over the matches until exhausted or context closed
  	var logs []*types.Log
  
  	for {
  		select {
  		case number, ok := <-matches:
  			// Abort if all matches have been fulfilled
  			if !ok {
  				err := session.Error()
  				if err == nil {
  					f.begin = int64(end) + 1
  				}
  				return logs, err
  			}
  			f.begin = int64(number) + 1
  
  			// Retrieve the suggested block and pull any truly matching logs
  			header, err := f.backend.HeaderByNumber(ctx, rpc.BlockNumber(number))
  			if header == nil || err != nil {
  				return logs, err
  			}
  			found, err := f.checkMatches(ctx, header)
  			if err != nil {
  				return logs, err
  			}
  			logs = append(logs, found...)
  
  		case <-ctx.Done():
  			return logs, ctx.Err()
  		}
  	}
  }
docs: // indexedLogs returns the logs matching the filter criteria based on the bloom
  // bits indexed available locally or via the network.