Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with cross_field type for Match or MultiMatch query #507

Open
jquacinella opened this issue Jan 28, 2016 · 1 comment
Open

Issue with cross_field type for Match or MultiMatch query #507

jquacinella opened this issue Jan 28, 2016 · 1 comment

Comments

@jquacinella
Copy link

It seems that PyES does not support "cross_field" queries (or any of the newer types) for Match or MultiMatch queries. For reference, here is a link to some docs. Is it just a matter of adding some values to the self._valid_types list?

@aparo Also, this project seems a bit inactive. I can fork and create a pull request, but I am no worried I am using a PyES in production while PyES is not being maintained. What is the general status of this project?

Example:

In [2]: pyes.MultiMatchQuery("title", "test", type="cross_fields")
...
----> 1 pyes.MultiMatchQuery("title", "test", type="cross_fields")

.../flask-env/local/lib/python2.7/site-packages/pyes/query.pyc in init(self, fields, text, type, slop, fuzziness, prefix_length, max_expansions, rewrite, operator, analyzer, use_dis_max, minimum_should_match, **kwargs)
1087
1088 if type not in self._valid_types:
-> 1089 raise QueryError("Invalid value '%s' for type: allowed values are %s" % (type, self._valid_types))
1090 if operator not in self._valid_operators:
1091 raise QueryError(

QueryError: Invalid value 'cross_fields' for type: allowed values are ['boolean', 'phrase', 'phrase_prefix']

@jquacinella
Copy link
Author

Whoops, looks like I pulled the trigger too quickly on this one. Latest version of pyes does have support for this. Will close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant