Example #1
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
Example #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
Example #3
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
Example #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