You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mike Hugo <mi...@piragua.com> on 2014/09/09 23:53:15 UTC

Wildcard in FL parameter not working with Solr 4.10.0

Hello,

With Solr 4.7 we had some queries that return dynamic fields by passing in
a fl=*_exact parameter; this is not working for us after upgrading to Solr
4.10.0.  This appears to only be a problem when requesting wildcarded
fields via SolrJ

With Solr 4.10.0 - I downloaded the binary and set up the example:

cd example
java -jar start.jar
java -jar post.jar solr.xml monitor.xml

In a browser, if I request

http://localhost:8983/solr/collection1/select?q=*:*&wt=json&indent=true
*&fl=*d*

All is well with the world:

{"responseHeader": {"status": 0,"QTime": 1,"params": {"fl": "*d","indent": "
true","q": "*:*","wt": "json"}},"response": {"numFound": 2,"start": 0,"docs
": [{"id": "SOLR1000"},{"id": "3007WFP"}]}}

However if I do the same query with SolrJ (groovy script)


@Grab(group = 'org.apache.solr', module = 'solr-solrj', version = '4.10.0')

import org.apache.solr.client.solrj.SolrQuery
import org.apache.solr.client.solrj.impl.HttpSolrServer

HttpSolrServer solrServer = new HttpSolrServer("
http://localhost:8983/solr/collection1")
SolrQuery q = new SolrQuery("*:*")
*q.setFields("*d")*
println solrServer.query(q)


No fields are returned:

{responseHeader={status=0,QTime=0,params={fl=*d,q=*:*,wt=javabin,version=2}},response={numFound=2,start=0,docs=[*SolrDocument{},
SolrDocument{}*]}}



Any ideas as to why when using SolrJ wildcarded fl fields are not returned?

Thanks,

Mike

Re: Wildcard in FL parameter not working with Solr 4.10.0

Posted by Mike Hugo <mi...@piragua.com>.
This may have been introduced by changes made to solve
https://issues.apache.org/jira/browse/SOLR-5968

I created https://issues.apache.org/jira/browse/SOLR-6501 to track the new
bug.

On Tue, Sep 9, 2014 at 4:53 PM, Mike Hugo <mi...@piragua.com> wrote:

> Hello,
>
> With Solr 4.7 we had some queries that return dynamic fields by passing in
> a fl=*_exact parameter; this is not working for us after upgrading to Solr
> 4.10.0.  This appears to only be a problem when requesting wildcarded
> fields via SolrJ
>
> With Solr 4.10.0 - I downloaded the binary and set up the example:
>
> cd example
> java -jar start.jar
> java -jar post.jar solr.xml monitor.xml
>
> In a browser, if I request
>
> http://localhost:8983/solr/collection1/select?q=*:*&wt=json&indent=true
> *&fl=*d*
>
> All is well with the world:
>
> {"responseHeader": {"status": 0,"QTime": 1,"params": {"fl": "*d","indent
> ": "true","q": "*:*","wt": "json"}},"response": {"numFound": 2,"start": 0,
> "docs": [{"id": "SOLR1000"},{"id": "3007WFP"}]}}
>
> However if I do the same query with SolrJ (groovy script)
>
>
> @Grab(group = 'org.apache.solr', module = 'solr-solrj', version = '4.10.0')
>
> import org.apache.solr.client.solrj.SolrQuery
> import org.apache.solr.client.solrj.impl.HttpSolrServer
>
> HttpSolrServer solrServer = new HttpSolrServer("
> http://localhost:8983/solr/collection1")
> SolrQuery q = new SolrQuery("*:*")
> *q.setFields("*d")*
> println solrServer.query(q)
>
>
> No fields are returned:
>
>
> {responseHeader={status=0,QTime=0,params={fl=*d,q=*:*,wt=javabin,version=2}},response={numFound=2,start=0,docs=[*SolrDocument{},
> SolrDocument{}*]}}
>
>
>
> Any ideas as to why when using SolrJ wildcarded fl fields are not returned?
>
> Thanks,
>
> Mike
>