Search code examples
postgresqlsphinx

sphinxsearch postgres sphinx_select disable match section


I use sphinx for postgres and run this query

SELECT id,weight FROM sphinx_select('sessionsearchsphinxidx','someword','', '', 0,50000,'ranker=wordcount')  

I want to use this method in case when no search query is defined. So in other words I want to return all records without any filter. Is it possible?


Solution

  • Have you tried leaving the query blank, the second param.

    Of course the weight will be meaningless as no query to match but otherwise should work.