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

Terms query for groups doesn't handle spaces #29

Open
cjcolvar opened this issue May 18, 2017 · 0 comments
Open

Terms query for groups doesn't handle spaces #29

cjcolvar opened this issue May 18, 2017 · 0 comments

Comments

@cjcolvar
Copy link
Contributor

I have groups that have spaces in them and this results in a bad solr query. A simplified query results in the following:

{'responseHeader'=>{'status'=>400,'QTime'=>0,'params'=>{'fq'=>'({!terms f=edit_access_group_ssim}public 2,test)','wt'=>'ruby'}},'error'=>{'metadata'=>['error-class','org.apache.solr.common.SolrException','root-error-class','org.apache.solr.common.SolrException'],'msg'=>'no field name specified in query and no default specified via \'df\' param','code'=>400}}

If we nest the terms query, it magically works:

{'responseHeader'=>{'status'=>0,'QTime'=>0,'params'=>{'fq'=>'_query_:"{!terms f=edit_access_group_ssim}public 2,test"','wt'=>'ruby'}},'response'=>{'numFound'=>0,'start'=>0,'maxScore'=>0.0,'docs'=>[]},'facet_counts'=>{'facet_queries'=>{},'facet_fields'=>{},'facet_ranges'=>{},'facet_intervals'=>{},'facet_heatmaps'=>{}}}

I tried escaping the term with a space in various ways including using a different separator but nothing seemed to work except nesting.

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