Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9499

Streaming Expression Cannot sort on aliased field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 6.2
    • None
    • search
    • None
    • 6.2.0_RC1

    Description

      an expression such as:

      search(test, rows=999999, q=table:article_p, fl="yi_pw,id,article:article_id", sort="article asc") 
      
      or
      
      search(test, rows=999999, q=table:article_p, fl="yi_pw,id,article:article_id", sort="article_id asc") 
      

      results in:

      {"result-set":{"docs":[
      {"EXCEPTION":"Fields in the sort spec must be included in the field list:article","EOF":true}]}}
      
      or
      
      {"result-set":{"docs":[
      {"EXCEPTION":"Fields in the sort spec must be included in the field list:article_id","EOF":true}]}}
      

      and

      {"result-set":{"docs":[
      {"EXCEPTION":"Fields in the sort spec must be included in the field list:article:article_id","EOF":true}]}}
      

      yeilds

      {"result-set":{"docs":[
      {"EXCEPTION":"java.util.concurrent.ExecutionException: java.io.IOException: --> http://10.1.3.9:8983/solr/test_shard1_replica1/:sort param could not be parsed as a query, and is not a field that exists in the index: article:article_id","EOF":true,"RESPONSE_TIME":5}]}}
      

      If I sort by id instead, it all works fine.

      Attachments

        1. SOLR-9499.patch
          2 kB
          Gus Heck

        Activity

          People

            Unassigned Unassigned
            gus Gus Heck
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: