lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shalin Shekhar Mangar (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-6501) Binary Response Writer does not return wildcard fields
Date Thu, 11 Sep 2014 19:20:34 GMT

     [ https://issues.apache.org/jira/browse/SOLR-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shalin Shekhar Mangar updated SOLR-6501:
----------------------------------------
    Attachment: SOLR-6501.patch

Test + fix.

I added a test in SolrExampleTests with all possible combinations of fields (field names,
globs, pseudo fields, score) which is now run for both XML and Binary response writers.

The CSV writer already has a test which tests all these types of return fields. There are
no corresponding tests for JSON. I will open a separate issue for JSON.

> Binary Response Writer does not return wildcard fields
> ------------------------------------------------------
>
>                 Key: SOLR-6501
>                 URL: https://issues.apache.org/jira/browse/SOLR-6501
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.10
>            Reporter: Mike Hugo
>            Assignee: Shalin Shekhar Mangar
>            Priority: Blocker
>         Attachments: SOLR-6501.patch
>
>
> In solr 4.10.0 queries that request dynamic fields by passing in a fl=*_exact parameter
do not return any fields.  This appears to only be a problem when requesting wildcarded fields
via SolrJ (BinaryResponseWriter).  Looks like this may have been introduced via https://issues.apache.org/jira/browse/SOLR-5968
> 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:
> {code}
> {
> "responseHeader": {
> "status": 0,
> "QTime": 1,
> "params": {
> "fl": "*d",
> "indent": "true",
> "q": "*:*",
> "wt": "json"
> }
> },
> "response": {
> "numFound": 2,
> "start": 0,
> "docs": [
> {
> "id": "SOLR1000"
> },
> {
> "id": "3007WFP"
> }
> ]
> }
> }
> {code}
> However if I do the same query with SolrJ (groovy script)
> {code}
> @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)
> {code}
> No fields are returned:
> {code}
> {responseHeader={status=0,QTime=0,params={fl=*d,q=*:*,wt=javabin,version=2}},response={numFound=2,start=0,docs=[SolrDocument{},
SolrDocument{}]}}
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message