SingleQuotePlugin lets phrases with space be split
A QueryParser with the default configuration, will parse the query
'gene chip' (single quotes included, on a TEXT field with stemming analyzer)
as (u"'gene cgip'", And([Term('content', u'gene'), Term('content', u'cgip')]))
that is it let the single-quoted term with spaces be split further.
If the SingleQuotePlugin is replaced with a customized PhrasePlugin which uses single-quotes to delimit a phrase, as in self._qparser.remove_plugin_class(SingleQuotePlugin) self._qparser.add_plugin(PhrasePlugin("'(?P<text>.*?)'"))
then it parses to (u"'gene cgip'", Phrase('content', [u'gene', u'cgip'], slop=1, boost=1.000000))
Unless I miss something, I would reccomend to ammend the default configuration.