当前位置: 首页>>代码示例>>Python>>正文


Python BloodhoundSearchApi.add_doc方法代码示例

本文整理汇总了Python中bhsearch.api.BloodhoundSearchApi.add_doc方法的典型用法代码示例。如果您正苦于以下问题:Python BloodhoundSearchApi.add_doc方法的具体用法?Python BloodhoundSearchApi.add_doc怎么用?Python BloodhoundSearchApi.add_doc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bhsearch.api.BloodhoundSearchApi的用法示例。


在下文中一共展示了BloodhoundSearchApi.add_doc方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _index_milestone

# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import add_doc [as 别名]
 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
开发者ID:thimalk,项目名称:bloodhound,代码行数:13,代码来源:milestone_search.py

示例2: _index_ticket

# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import add_doc [as 别名]
 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
开发者ID:mohsadki,项目名称:dargest,代码行数:14,代码来源:ticket_search.py

示例3: _index_wiki

# 需要导入模块: from bhsearch.api import BloodhoundSearchApi [as 别名]
# 或者: from bhsearch.api.BloodhoundSearchApi import add_doc [as 别名]
 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
开发者ID:Stackato-Apps,项目名称:bloodhound,代码行数:17,代码来源:wiki_search.py


注:本文中的bhsearch.api.BloodhoundSearchApi.add_doc方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。