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

pk ids not sort when in deltaQuery

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 7.1
    • None
    • None
    • windows10

      Solr7.1

      JDK8

       

    Description

      I use solr and mysql for search. 

       

      // data-config.xml
      query="select * from score order by create_date asc"  
      deltaImportQuery="select * from score where id='${dih.delta.id}'" 
      deltaQuery="selectid from score where update_date > '${dataimporter.last_index_time}' order by create_date asc "
      

       

       Mysql has three rows data in score table

       

      id name score create_date update_date
      UUID1 user1 60 2018-04-10 2018-04-10
      UUID2 user1 70 2018-04-11  2018-04-11
      UUID3 user1 80 2018-04-12 2018-04-12

      The expected results In solr doc

      Name Score CreateDate UpdateDate
      user1 80 2018-04-12 2018-04-12

       

      Use full import it will correct , but use delta import will wrong.

      In the org.apache.solr.handler.dataimport.DocBuilder class ,  return not LinkHashSet in 

      collectDelta method. 

       

      Thanks.

       

       

       

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            wzhonggo wzhonggo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment