Did I find the right examples for you? yes no

All Samples(7)  |  Call(5)  |  Derive(0)  |  Import(2)

src/s/p/sphinxit-fc-0.3.3/sphinxit/tests/test_core.py   sphinxit-fc(Download)
    import unittest
 
from ..core.lexemes import (SXQLSelect, SXQLFrom, SXQLLimit, SXQLOrder,
                            SXQLGroupBy, SXQLWithinGroupOrderBy,
                            SXQLMatch, SXQLFilter, SXQLORFilter, SXQLOption,
    def test_basics(self):
        sxql_inst = SXQLSnippets('index', data=['only good news'], query='Good News')
        self.assertEqual(sxql_inst.lex, "CALL SNIPPETS(('only good news'), 'index', 'Good News')")
 
    def test_with_options_1(self):
        snippet_options = {'limit': 320,
                           'allow_empty': True,
                           }
        possible_options_ordering = ["320 AS limit, 1 AS allow_empty", "1 AS allow_empty, 320 AS limit"]
        sxql_inst = SXQLSnippets('index', data=['only good news'], query='Good News', options=snippet_options)
        possible_options_ordering = ["'<strong>' AS before_match, '</strong>' AS after_match",
                                     "'</strong>' AS after_match, '<strong>' AS before_match"]
        sxql_inst = SXQLSnippets('index', data=['only good news'], query='Good News', options=snippet_options)
        possible_queries = ["CALL SNIPPETS(('only good news'), 'index', 'Good News', {opts})".format(opts=opts)
                            for opts in possible_options_ordering]
    def test_quotes_escaping(self):
        sxql_inst_1 = SXQLSnippets('index', data=["only l'amour", "l'oreal"], query="L'amour")
        self.assertEqual(sxql_inst_1.lex, "CALL SNIPPETS(('only l\\'amour', 'l\\'oreal'), 'index', 'L\\'amour')")
 
    def test_string_as_data(self):

src/s/p/sphinxit-fc-0.3.3/sphinxit/search.py   sphinxit-fc(Download)
from .core.exceptions import SphinxQLSyntaxException, ImproperlyConfigured
from .core.processor import SphinxSearchBase
from .core.lexemes import SXQLSnippets