code: def make_obj_iter(text_iter, query):
      
      if query.secondary_index_only:
          cls = IDXObject
      else:
          cls = CDXObject
  
      return (cls(line) for line in text_iter)
docs: convert text cdx stream to CDXObject/IDXObject.