def _index_milestone(self, milestone): try: doc = self.build_doc(milestone) search_api = BloodhoundSearchApi(self.env) search_api.add_doc(doc) except Exception, e: if self.silence_on_error: self.log.error("Error occurs during wiki indexing. \ The error will not be propagated. Exception: %s", e) else: raise
def _index_changeset(self, changeset): try: doc = self.build_doc(changeset) search_api = BloodhoundSearchApi(self.env) search_api.add_doc(doc) except Exception, e: if self.silence_on_error: self.log.error( "Error occurs during changeset indexing. \ The error will not be propagated. Exception: %s", e) else: raise
def _index_ticket(self, ticket, search_api=None, operation_context=None): try: if not search_api: search_api = BloodhoundSearchApi(self.env) doc = self.build_doc(ticket) search_api.add_doc(doc, operation_context) except Exception, e: if self.silence_on_error: self.log.error("Error occurs during ticket indexing. \ The error will not be propagated. Exception: %s", e) else: raise
def _index_ticket(self, ticket, search_api=None, operation_context=None): try: if not search_api: search_api = BloodhoundSearchApi(self.env) doc = self.build_doc(ticket) search_api.add_doc(doc, operation_context) except Exception, e: if self.silence_on_error: self.log.error( "Error occurs during ticket indexing. \ The error will not be propagated. Exception: %s", e) else: raise
def _index_wiki(self, page): try: doc = self.build_doc(page) search_api = BloodhoundSearchApi(self.env) search_api.add_doc(doc) except Exception, e: page_name = None if page is not None: page_name = page.name if self.silence_on_error: self.log.error("Error occurs during wiki indexing: %s. \ The error will not be propagated. Exception: %s", page_name, e) else: raise
def _index_wiki(self, page): try: doc = self.build_doc(page) search_api = BloodhoundSearchApi(self.env) search_api.add_doc(doc) except Exception, e: page_name = None if page is not None: page_name = page.name if self.silence_on_error: self.log.error( "Error occurs during wiki indexing: %s. \ The error will not be propagated. Exception: %s", page_name, e) else: raise