Commit 9d2b5f11 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

support other comparison operators than match or match_boolean in MroongaFullTextKey.

parent f0555a5e
...@@ -85,9 +85,14 @@ class MroongaFullTextKey(FullTextKey): ...@@ -85,9 +85,14 @@ class MroongaFullTextKey(FullTextKey):
fulltext_query += ' *S"%s"' % ' '.join(x.replace('"', '\\"') for x in match_query) fulltext_query += ' *S"%s"' % ' '.join(x.replace('"', '\\"') for x in match_query)
if match_boolean_query: if match_boolean_query:
fulltext_query += ' %s' % ' '.join(match_boolean_query) fulltext_query += ' %s' % ' '.join(match_boolean_query)
if match_query or match_boolean_query:
append(SimpleQuery(search_key=self, append(SimpleQuery(search_key=self,
comparison_operator='match_boolean', comparison_operator='match_boolean',
group=group, **{column: fulltext_query})) group=group, **{column: fulltext_query}))
for comparison_operator, value_list in operator_value_dict.iteritems():
append(SimpleQuery(search_key=self,
comparison_operator=comparison_operator,
group=group, **{column: ' '.join(value_list)}))
return query_list return query_list
verifyClass(ISearchKey, MroongaFullTextKey) verifyClass(ISearchKey, MroongaFullTextKey)
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