コード例 #1
0
 def __init__(self, status, field, term, user_sph_map={}):
     self.status = status
     self.term = utils.strips(term)
     field = field.strip().lower()
     self.user_field = utils.dictreverse(user_sph_map).get(field,
                                                           field).lower()
     self.sph_field = user_sph_map.get(field, field).lower()
コード例 #2
0
ファイル: queries.py プロジェクト: pombredanne/fSphinx
 def sphinx(self):
     """The string representation of this query which should be sent to sphinx.
     """
     s = utils.strips(' '.join(qt.sphinx for qt in self))
     if not s and not self.ALLOW_EMPTY:
         s = ' '
     return s
コード例 #3
0
ファイル: queries.py プロジェクト: SergeyKubrak/fSphinx
 def sphinx(self):
     """The string representation of this query which should be sent to sphinx.
     """
     s = utils.strips(' '.join(qt.sphinx for qt in self))
     if not s and not self.ALLOW_EMPTY:
         s = ' '
     return s
コード例 #4
0
 def uniq(self):
     """A canonical / unique string representation of this query.
     """
     return utils.strips(' '.join(qt.uniq for qt in sorted(self)))
コード例 #5
0
ファイル: queries.py プロジェクト: pombredanne/fSphinx
 def uniq(self):
     """A canonical / unique string representation of this query.
     
     SQLCache will look for this variable when caching the query results.
     """
     return utils.strips(' '.join(qt.uniq for qt in sorted(self)))
コード例 #6
0
ファイル: queries.py プロジェクト: pombredanne/fSphinx
 def __init__(self, status, field, term, user_sph_map={}):
     self.status = status
     self.term = utils.strips(term)
     field = field.strip().lower()
     self.user_field = utils.dictreverse(user_sph_map).get(field, field).lower()
     self.sph_field = user_sph_map.get(field, field).lower()
コード例 #7
0
 def uniq(self):
     """A canonical / unique string representation of this query.
     """
     return utils.strips(' '.join(qt.uniq for qt in sorted(self)))
コード例 #8
0
ファイル: queries.py プロジェクト: SergeyKubrak/fSphinx
 def uniq(self):
     """A canonical / unique string representation of this query.
     
     SQLCache will look for this variable when caching the query results.
     """
     return utils.strips(' '.join(qt.uniq for qt in sorted(self)))