2

I have a created solr core named data. This core has two structurally different types of data:
playlist and album (actual tracks). Relation is

playlist has 1...* album playlist

while retrieving playlist info, I want to retrieve album info in the same doc. I tried this

Query
q=playlist_id:XXXXX

Field List
fl=*,album_info:[subquery]

rawQueryParam:
album_info.q={!terms f=album_unique_id v=$row.album_id}

This means I want to retrieve album_unique_id which is the album_id in playlist.

I studied Solr doc and created above query. But not getting the required result. I get an exception in the response:

{
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.search.SyntaxError"],
    "msg":"while invoking album_info.q:[subquery] on doc=SolrDocument{album_unique_id =stored,indexed,tokenized,omitNorms,indexOptions=DOCS<album_unique_id:20-3-108-10080",
    "code":400}}

Need to understand the reason for this error. Also, do I need to enable some plugin for this?

solr version: v6.4

Lefty G Balogh
  • 1,771
  • 3
  • 26
  • 40
acorntech
  • 53
  • 8
  • Hmmm... There are a few things I'm unsure of there... Are you using the Admin Console to do this? If yes can you add the URL that results and possibly a screenshot of the Admin Console before you press the search button? – jb62 Oct 19 '16 at 19:52
  • Yes I am searching using admin. I guess it has something to do with the UI of solr admin console. Not sure right now. Also, does subquery transformation has an option for nesting till n level as we have in mysql – acorntech Oct 20 '16 at 04:53
  • Please issue the query on the Admin UI and post the URL that results (you'll find it just above the results in the Admin UI after they return) – jb62 Oct 20 '16 at 15:25

0 Answers0