Commit 21e9b26e authored by Ivan Tyagov's avatar Ivan Tyagov

Define Sphinx's default global search full text modes.

These defaults are same as ones used in MyISAM search (respectively ZCatalog limits). Still these defaults must be configurable outside implementation script (work in progress).

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42792 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 46723fe1
...@@ -55,6 +55,14 @@ ...@@ -55,6 +55,14 @@
"""\n """\n
from Products.ZSQLCatalog.SQLCatalog import Query\n from Products.ZSQLCatalog.SQLCatalog import Query\n
\n \n
# set some global search engine defaults (XXX: use preferences?)\n
defaut_dict = {\'mode\': \'ext2\', # full text search mode\n
\'limit\': 1000, # max number of results\n
}\n
for key, item in defaut_dict.items():\n
operator = \';%s\' %key\n
if operator not in value:\n
value = \'%s%s=%s\' %(value, operator, item)\n
query = Query(**{\'sphinxse_query\': value})\n query = Query(**{\'sphinxse_query\': value})\n
return query\n return query\n
</string> </value> </string> </value>
......
19 20
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment