I have the following schema

<field name="id" type="string" indexed="true" stored="true" required="true"
multiValued="false" />
<field name="media_id" type="int" indexed="true" stored="true"
required="false" multiValued="false" />
<field name="sentence"  type="text_general" indexed="true" stored="true"
termVectors="true" termPositions="true" termOffsets="true" />


I'd like to be able to facet by a field and then by queries. i.e.


facet_fields": {"media_id": ["1":{ "sentence:foo": 102410, "sentence:bar":
29710}"2":
{ "sentence:foo": 600, "sentence:bar": 220}
"3":
{ "sentence:foo": 80, "sentence:bar": 2330}]}


However, when I try:
http://localhost:8983/solr/collection1/select?q=*:*&wt=json&indent=true&facet=true&facet.query=sentence%3A%foo&facet.query=sentence%3Abar&facet.field=media_id

the facet counts for the queries and media_id are listed separately rather
than hierarchically.

I realize that I could use 2 separate requests and programmatically combine
the results but would much prefer to use a single Solr request.

Is there any way to go this in Solr?

Thanks in advance,


David

Reply via email to