當前位置: 首頁>>代碼示例>>Python>>正文


Python Searcher.find方法代碼示例

本文整理匯總了Python中outwiker.core.search.Searcher.find方法的典型用法代碼示例。如果您正苦於以下問題:Python Searcher.find方法的具體用法?Python Searcher.find怎麽用?Python Searcher.find使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在outwiker.core.search.Searcher的用法示例。


在下文中一共展示了Searcher.find方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: testSearchAllAny

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    def testSearchAllAny (self):
        phrase = u""
        tags = []

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

        self.assertEqual (len (pages), 5)
開發者ID:qyqx,項目名稱:outwiker,代碼行數:10,代碼來源:search.py

示例2: testSearchTagsContent1

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    def testSearchTagsContent1 (self):
        phrase = u"метка"
        tags = []

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

        self.assertEqual (len (pages), 5)
開發者ID:qyqx,項目名稱:outwiker,代碼行數:10,代碼來源:search.py

示例3: testSearchAllAll

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    def testSearchAllAll (self):
        phrase = u""
        tags = []

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

        self.assertEqual (len (pages), 5)
開發者ID:LihMeh,項目名稱:outwiker,代碼行數:10,代碼來源:search.py

示例4: testSearchFullAny

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:12,代碼來源:search.py

示例5: testSearchTag2All

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:12,代碼來源:search.py

示例6: testSearchAttach6

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:12,代碼來源:search.py

示例7: testSearchAttach3

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:12,代碼來源:search.py

示例8: testSearchAttach5

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:12,代碼來源:search.py

示例9: testSearchAttach2

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:13,代碼來源:search.py

示例10: testSearchContentAll

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:13,代碼來源:search.py

示例11: testSearchTag2Any

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:14,代碼來源:search.py

示例12: testSearchSingleTagAll

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:14,代碼來源:search.py

示例13: testSearchTagsContent2

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:14,代碼來源:search.py

示例14: testSearchAttach1

# 需要導入模塊: from outwiker.core.search import Searcher [as 別名]
# 或者: from outwiker.core.search.Searcher import find [as 別名]
    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,代碼行數:14,代碼來源:search.py


注:本文中的outwiker.core.search.Searcher.find方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。