Commit 79ef08f6 authored by Ivan Tyagov's avatar Ivan Tyagov

Extend search string syntax (usable in DMS).

Improve comments.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33272 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8bec1d30
......@@ -56,8 +56,21 @@
<value> <string encoding="cdata"><![CDATA[
"""\n
Make SQLCatalog parse given search string and generate an Abstract Syntax Tree.\n
Then, walk this tree and categorize criterion by type (and their alias, see code).\n
Make SQLCatalog parse given search string and generate an Abstract Syntax Tree.\n
Then, walk this tree and categorize criterion by type (and their alias, see code).\n
\n
Example:\n
* input:\n
word_to_search_for "exact_phrase" +containing_all_the_words -without_word created:1w reference:nxd-test version:001 language:en contributor_title:John mine:yes newest:yes\n
\n
* output\n
{\'newest\': \'yes\', \n
\'reference\': \'nxd-test\', \n
\'language\': \'en\', \n
\'mine\': \'yes\', \n
\'searchabletext\': \'word_to_search_for exact_phrase +containing_all_the_words -without_word John\', \n
\'version\': \'001\', \n
\'creation_from\': DateTime(\'2010/02/23 13:11:11.698 GMT+2\')}\n
"""\n
from DateTime import DateTime\n
\n
......@@ -121,6 +134,10 @@ criterion_alias_dict = {\n
\'source_reference\': (True, None),\n
\'creation_from\': (True, None),\n
\'searchabletext\': (True, None),\n
# indicates user search only within owned documents\n
\'mine\': (True, None),\n
# indicates user search only the newest versions\n
\'newest\': (True, None),\n
}\n
\n
DEFAULT_CRITERION_ALIAS = \'searchabletext\'\n
......
1495
\ No newline at end of file
1497
\ 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