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

delete docs only in a spec shard within a collection

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.6, 4.7
    • None
    • contrib - Clustering
    • None

    Description

      Suppose to delete docs in a spec shard within a collection,using this the command
      [1]http://localhost:8082/solr/tv_201402/update?&stream.body=<delete><query>BEGINTIME:["2014-03-01 00:00:00" TO *]</query></delete>&shards=tv_201402&commit=true.
      As a result, all the docs over the collection which BEGINTIME is larger than 2014-03-01 00:00:00 were deleted.

      After I check the source code :DistributedUpdateProcessor.doDeleteByQuery.It shows that the route and shard.keys can make work, which indeed works after I have try with the cmd:
      [2]http://10.1.22.1:8082/solr/tv_201402/update?stream.body=<delete><query>BEGINTIME:["2014-03-01 00:00:00" TO "2014-03-02 00:00:00"]</query></delete>&route=tv_201402&commit=true

      As the first request[1],I use the shards parameter hoping to delete docs only in the tv_201402, while the second request[1],it change to route parameter .

      The purpose that I file the JIRA is that we should make it to be consist that the shards parameter should also can make request no distrib during updating just as some as searching.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stanleyyang YouPeng Yang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: