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 Fabrício Quintela <fq...@gmail.com> on 2016/04/24 20:20:03 UTC

Return some fields plus count???

Hi all,

Does anybody knows how to retrieve a list of fields plus a calculated field
like a subquery?

Scenario:

docs: [
{
  id: 123
  text:"AAA"
  parent:""
},
{
  id: 456
  text:"BBB"
  parent:"123"
},
id: 789
  text:"CCC"
  parent:"123"
]

My query fl=id, text, parent, count should return 123, "AAA", "", 2 when I
search by the id=123

Thanks all

Re: Return some fields plus count???

Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi Fabricio,

May be use faceting? facet.field=parent

Ahmet


On Sunday, April 24, 2016 9:20 PM, Fabrício Quintela <fq...@gmail.com> wrote:
Hi all,

Does anybody knows how to retrieve a list of fields plus a calculated field
like a subquery?

Scenario:

docs: [
{
  id: 123
  text:"AAA"
  parent:""
},
{
  id: 456
  text:"BBB"
  parent:"123"
},
id: 789
  text:"CCC"
  parent:"123"
]

My query fl=id, text, parent, count should return 123, "AAA", "", 2 when I
search by the id=123

Thanks all