def get_keyword_query(self, **kw):
query = dict()<EOL>indexes = self.catalog.get_indexes()<EOL>for k, v in kw.iteritems():<EOL><INDENT>if k.lower() == "<STR_LIT>":<EOL><INDENT>k = "<STR_LIT>"<EOL><DEDENT>if k.lower() == "<STR_LIT>":<EOL><INDENT>if v:<EOL><INDENT>v = _.to_list(v)<EOL><DEDENT><DEDENT>if k not in indexes:<EOL><INDENT>logger.warn("<STR_LIT>" % (k, v))<EOL>continue<EOL><DEDENT>if v is None:<EOL><INDENT>logger.warn("<STR_LIT>" % (k, v))<EOL>continue<EOL><DEDENT>logger.debug("<STR_LIT>" % (k, v))<EOL>query[k] = v<EOL><DEDENT>return query<EOL>
Generates a query from the given keywords.
        Only known indexes make it into the generated query.

        :returns: Catalog query
        :rtype: dict