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


Python search.Searcher类代码示例

本文整理汇总了Python中outwiker.core.search.Searcher的典型用法代码示例。如果您正苦于以下问题:Python Searcher类的具体用法?Python Searcher怎么用?Python Searcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testSearchAllAny

    def testSearchAllAny (self):
        phrase = u""
        tags = []

        searcher = Searcher (phrase, tags, AnyTagSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 5)
开发者ID:qyqx,项目名称:outwiker,代码行数:8,代码来源:search.py

示例2: testSearchTagsContent1

    def testSearchTagsContent1 (self):
        phrase = u"метка"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 5)
开发者ID:qyqx,项目名称:outwiker,代码行数:8,代码来源:search.py

示例3: testSearchAllAll

    def testSearchAllAll (self):
        phrase = u""
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.wikiroot)

        self.assertEqual (len (pages), 5)
开发者ID:LihMeh,项目名称:outwiker,代码行数:8,代码来源:search.py

示例4: testSearchFullAny

    def testSearchFullAny (self):
        phrase = u"Декабря"
        tags = [u"Метка 2"]

        searcher = Searcher (phrase, tags, AnyTagSearchStrategy)
        pages = searcher.find (self.rootwiki)
        
        self.assertEqual (len (pages), 2)
        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2/Страница 3"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:10,代码来源:search.py

示例5: testSearchTag2All

    def testSearchTag2All (self):
        phrase = u""
        tags = [u"МеткА 1", u"МетКа 2"]

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 2)
        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"page 1/page 5"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:10,代码来源:search.py

示例6: testSearchAttach6

    def testSearchAttach6 (self):
        phrase = u"ApplicAtiOn.pY"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 1)

        self.assertTrue (self.rootwiki[u"page 1"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:10,代码来源:search.py

示例7: testSearchAttach3

    def testSearchAttach3 (self):
        phrase = u"файл с пробелами"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 1)

        self.assertTrue (self.rootwiki[u"page 1"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:10,代码来源:search.py

示例8: testSearchAttach5

    def testSearchAttach5 (self):
        phrase = u"SubdIr2"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.wikiroot)

        self.assertEqual (len (pages), 1)

        self.assertTrue (self.wikiroot[u"page 1"] in pages)
开发者ID:LihMeh,项目名称:outwiker,代码行数:10,代码来源:search.py

示例9: testSearchAttach2

    def testSearchAttach2 (self):
        phrase = u"anchor"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 2)

        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2/Страница 3"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:11,代码来源:search.py

示例10: testSearchContentAll

    def testSearchContentAll (self):
        phrase = u"Декабря"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 3)
        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2/Страница 3"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:11,代码来源:search.py

示例11: testSearchTag2Any

    def testSearchTag2Any (self):
        phrase = u""
        tags = [u"МеткА 1", u"МетКа 3"]

        searcher = Searcher (phrase, tags, AnyTagSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 4)
        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2/Страница 3/Страница 4"] in pages)
        self.assertTrue (self.rootwiki[u"page 1/page 5"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:12,代码来源:search.py

示例12: testSearchSingleTagAll

    def testSearchSingleTagAll (self):
        phrase = u""
        tags = [u"Метка 1"]

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 4)
        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2/Страница 3/Страница 4"] in pages)
        self.assertTrue (self.rootwiki[u"page 1/page 5"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:12,代码来源:search.py

示例13: testSearchTagsContent2

    def testSearchTagsContent2 (self):
        phrase = u"МеТкА 1"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.rootwiki)

        self.assertEqual (len (pages), 4)
        self.assertTrue (self.rootwiki[u"page 1"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2"] in pages)
        self.assertTrue (self.rootwiki[u"Страница 2/Страница 3/Страница 4"] in pages)
        self.assertTrue (self.rootwiki[u"page 1/page 5"] in pages)
开发者ID:qyqx,项目名称:outwiker,代码行数:12,代码来源:search.py

示例14: testSearchAttach1

    def testSearchAttach1 (self):
        phrase = u"accept"
        tags = []

        searcher = Searcher (phrase, tags, AllTagsSearchStrategy)
        pages = searcher.find (self.wikiroot)

        self.assertEqual (len (pages), 3)

        self.assertTrue (self.wikiroot[u"page 1"] in pages)
        self.assertTrue (self.wikiroot[u"Страница 2/Страница 3"] in pages)
        self.assertTrue (self.wikiroot[u"Страница 2"] in pages)
开发者ID:LihMeh,项目名称:outwiker,代码行数:12,代码来源:search.py


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