예제 #1
0
파일: indexer.py 프로젝트: Atom66/tain335
 def phraseSearch(self, field, words):
     "Search for a phrase (given as a list of words) in C{field}."
     q = PhraseQuery()
     for word in words:
         t = Term(field, word)
         q.add(t)  
     return q
예제 #2
0
 def phraseSearch(self, field, words):
     "Search for a phrase (given as a list of words) in C{field}."
     q = PhraseQuery()
     for word in words:
         t = Term(field, word)
         q.add(t)
     return q
예제 #3
0
파일: testLupy.py 프로젝트: kjk/ipedia-palm
def phraseSearch(qStr, field='body'):
    """Find all docs containing the phrase C{qStr}."""
    parts = qStr.split()
    q = PhraseQuery()
    for p in parts:
        t = Term(field, p)
        q.add(t)
    return q
예제 #4
0
def phraseSearch(qStr, field='body'):
    """Find all docs containing the phrase C{qStr}."""
    parts = qStr.split()
    q = PhraseQuery()
    for p in parts:
        t = Term(field, p)
        q.add(t)
    return q