[
https://issues.apache.org/jira/browse/SOLR-7414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hoss Man updated SOLR-7414:
---------------------------
Description:
Attempting to retrieve all fields while renaming one, e.g., "inStock" to
"stocked" (URL below), results in CSV output that has a column for "inStock"
(should be "stocked"), and the column has no values.
steps to reproduce using 5.1...
{noformat}
$ bin/solr -e techproducts
...
$ curl -X POST -H 'Content-Type: application/json'
'http://localhost:8983/solr/techproducts/update?commit=true' --data-binary '[{
"id" : "aaa", "bar_i" : 7, "inStock" : true }, { "id" : "bbb", "bar_i" : 7,
"inStock" : false }, { "id" : "ccc", "bar_i" : 7, "inStock" : true }]'
{"responseHeader":{"status":0,"QTime":730}}
$ curl
'http://localhost:8983/solr/techproducts/query?q=bar_i:7&fl=id,stocked:inStock&wt=csv'
id,stocked
aaa,true
bbb,false
ccc,true
$ curl
'http://localhost:8983/solr/techproducts/query?q=bar_i:7&fl=*,stocked:inStock&wt=csv'
bar_i,id,_version_,inStock
7,aaa,1498719888088236032,
7,bbb,1498719888090333184,
7,ccc,1498719888090333185,
$ curl
'http://localhost:8983/solr/techproducts/query?q=bar_i:7&fl=stocked:inStock,*&wt=csv'
bar_i,id,_version_,inStock
7,aaa,1498719888088236032,
7,bbb,1498719888090333184,
7,ccc,1498719888090333185,
{noformat}
was:
Attempting to retrieve all fields while renaming one, e.g., "inStock" to
"stocked" (URL below), results in CSV output that has a column for "inStock"
(should be "stocked"), and the column has no values. I would have expected this
to behave like the JSON and XML response writers.
http://localhost:8983/solr/select?q=*&fl=*,stocked:inStock&wt=csv
Summary: CSVResponseWriter returns empty field when fl alias is
combined with '*' selector (was: CSVResponseWriter returns empty field when
alias requested)
thanks for reporting this.
tweaked summary/description to clarify conditions that trigger this, and
provide full steps to reproduce using the stock example configs
> CSVResponseWriter returns empty field when fl alias is combined with '*'
> selector
> ---------------------------------------------------------------------------------
>
> Key: SOLR-7414
> URL: https://issues.apache.org/jira/browse/SOLR-7414
> Project: Solr
> Issue Type: Bug
> Components: Response Writers
> Reporter: Michael Lawrence
>
> Attempting to retrieve all fields while renaming one, e.g., "inStock" to
> "stocked" (URL below), results in CSV output that has a column for "inStock"
> (should be "stocked"), and the column has no values.
> steps to reproduce using 5.1...
> {noformat}
> $ bin/solr -e techproducts
> ...
> $ curl -X POST -H 'Content-Type: application/json'
> 'http://localhost:8983/solr/techproducts/update?commit=true' --data-binary
> '[{ "id" : "aaa", "bar_i" : 7, "inStock" : true }, { "id" : "bbb", "bar_i" :
> 7, "inStock" : false }, { "id" : "ccc", "bar_i" : 7, "inStock" : true }]'
> {"responseHeader":{"status":0,"QTime":730}}
> $ curl
> 'http://localhost:8983/solr/techproducts/query?q=bar_i:7&fl=id,stocked:inStock&wt=csv'
> id,stocked
> aaa,true
> bbb,false
> ccc,true
> $ curl
> 'http://localhost:8983/solr/techproducts/query?q=bar_i:7&fl=*,stocked:inStock&wt=csv'
> bar_i,id,_version_,inStock
> 7,aaa,1498719888088236032,
> 7,bbb,1498719888090333184,
> 7,ccc,1498719888090333185,
> $ curl
> 'http://localhost:8983/solr/techproducts/query?q=bar_i:7&fl=stocked:inStock,*&wt=csv'
> bar_i,id,_version_,inStock
> 7,aaa,1498719888088236032,
> 7,bbb,1498719888090333184,
> 7,ccc,1498719888090333185,
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]