Guest | 10 Nisan 2014 saat 14:20
discount generic cialis cheap auto insurance online fl doxycicline viagra cialis vs viagra levitra
Sanatçının Şarkıları
|
ArWikiGuest | 10 Nisan 2014 saat 14:20 discount generic cialis cheap auto insurance online fl doxycicline viagra cialis vs viagra levitraGuest | 18 Şubat 2014 saat 02:55 The puecahsrs I make are entirely based on these articles.Guest | 17 Şubat 2014 saat 15:52 Whoosh的分è¯æ˜¯åŸºäºæ£åˆ™è¡¨è¾¾å¼çš„,所以åªéœ€è¦å†™å‡ºåˆé€‚çš„æ£åˆ™è¡¨è¾¾å¼å°±å¯ä»¥æ£ç¡®åˆ†è¯ã€‚下é¢æ˜¯ä¸€äº›ä¾‹å,å¯èƒ½æœ‰ä¸å®Œå–„的地方,需è¦ç»§ç»å®Œå–„完善。#测试分è¯#!/usr/bin/env python# -*- cdiong: UTF-8 -*-from whoosh.analysis import RegexAnalyzerrex = RegexAnalyzer(ur ([\u4e00-\u9fa5])|(\w+(\.?\w+)*) )print [token.text for token in rex(u"hi ä¸ 000 ä¸æ–‡æµ‹è¯•ä¸æ–‡ there 3.141 big-time under_score")]#一个完整的演示#!/usr/bin/env python# -*- cdiong: UTF-8 -*-from whoosh.index import create_infrom whoosh.fields import *from whoosh.analysis import RegexAnalyzeranalyzer = RegexAnalyzer(ur ([\u4e00-\u9fa5])|(\w+(\.?\w+)*) )schema = Schema(title=TEXT(stored=True), path=ID(stored=True), content=TEXT(stored=True, analyzer=analyzer))ix = create_in( indexdir , schema)writer = ix.writer()writer.add_document(title=u First document , path=u /a , content=u This is the first document we've added! )writer.add_document(title=u Second document , path=u /b , content=u The second one ä½ ä¸æ–‡æµ‹è¯•ä¸æ–‡ is even more interesting! )writer.commit()searcher = ix.searcher()results = searcher.find( content , u first )print results[0]results = searcher.find( content , u ä½ )print results[0]results = searcher.find( content , u 测试 )print results[0]ArWiki Ekle | |