docstr: search documents for query string.
  Args:
      query(str):  the word or phrase to search
      topic_ids(list of ints): list of topid IDs where each id is in the range
                               of range(self.n_topics).
      doc_ids (list of ints): list of document IDs where each id is an index
                              into self.doctopics
      case_sensitive(bool):  If True, case sensitive search
docstr_tok: ["search","documents","for","query","string",".","Args",":","query","(","str",")",":","the","word","or","phrase","to","search","topic_ids","(","list","of","ints",")",":","list","of","topid","IDs","where","each","id","is","in","the","range","of","range","(","self.n_topics",")",".","doc_ids","(","list","of","ints",")",":","list","of","document","IDs","where","each","id","is","an","index","into","self.doctopics","case_sensitive","(","bool",")",":","If","True",",","case","sensitive","search"]
code: def search(
      self, query, topic_ids=[], doc_ids=[], case_sensitive=False
  ):
      """
      search documents for query string.
      Args:
          query(str):  the word or phrase to search
          topic_ids(list of ints): list of topid IDs where each id is in the range
                                   of range(self.n_topics).
          doc_ids (list of ints): list of document IDs where each id is an index
                                  into self.doctopics
          case_sensitive(bool):  If True, case sensitive search
      """
  
      # setup pattern
      if not case_sensitive:
          query = query.lower()
      pattern = re.compile(r"\b%s\b" % query)
  
      # retrive docs
      docs = self.get_docs(topic_ids=topic_ids, doc_ids=doc_ids)
  
      # search
      mb = master_bar(range(1))
      results = []
      for i in mb:
          for doc in progress_bar(docs, parent=mb):
              text = doc["text"]
              if not case_sensitive:
                  text = text.lower()
              matches = pattern.findall(text)
              if matches:
                  results.append(doc)
          if self.verbose:
              mb.write("done.")
      return results
  
imports: import time
  from ..None import utils
  from ..imports import *
  from .None import preprocessor
  from .None import textutils
label_desc: Use image node_id 20 for calling the TopicModel obj's underlying member method code with example usage: obj.search(query, topic_ids, doc_ids, case_sensitive) and returns: results