Solr
  1. Solr
  2. SOLR-1059

Add special variables for deleting documents, skipping rows and transforms in DIH

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4
    • Labels:
      None

      Description

      There is no means to delete docs in DIH.

      add two special variables

      1. $deleteDocId
      2. $deleteDocQuery

      if the returned row contains these fields DIH will delete docs by id or query depending on what is present

      1. SOLR-1059.patch
        6 kB
        Noble Paul
      2. SOLR-1059.patch
        3 kB
        Noble Paul
      3. SOLR-1059.patch
        14 kB
        Shalin Shekhar Mangar
      4. SOLR-1059.patch
        13 kB
        Shalin Shekhar Mangar
      5. SOLR-1059.patch
        7 kB
        Noble Paul
      6. SOLR-1059.patch
        6 kB
        Noble Paul
      7. SOLR-1059.patch
        5 kB
        Noble Paul

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Would it be nice if we also had methods in Context to do these things?

        Show
        Shalin Shekhar Mangar added a comment - Would it be nice if we also had methods in Context to do these things?
        Hide
        Noble Paul added a comment -

        yes Context also can have methods.

        again on the same lines as
        $skipDoc we may also have

        $skipRow: this row is ignored , but this document is not 
        $stopTransform : after this no more transformers
        

        I shall open another issue for these

        Show
        Noble Paul added a comment - yes Context also can have methods. again on the same lines as $skipDoc we may also have $skipRow: this row is ignored , but this document is not $stopTransform : after this no more transformers I shall open another issue for these
        Hide
        Fergus McMenemie added a comment -

        SOLR-1060 want to have a delete method as well. Can i assume that this is going forward, and populate the $deleteDocId $deleteDocQuery fields when ever a document is to be deleted.

        Show
        Fergus McMenemie added a comment - SOLR-1060 want to have a delete method as well. Can i assume that this is going forward, and populate the $deleteDocId $deleteDocQuery fields when ever a document is to be deleted.
        Hide
        Shalin Shekhar Mangar added a comment -

        Can i assume that this is going forward, and populate the $deleteDocId $deleteDocQuery fields when ever a document is to be deleted.

        I'm +1 on it. I don't think there should be any objections.

        Show
        Shalin Shekhar Mangar added a comment - Can i assume that this is going forward, and populate the $deleteDocId $deleteDocQuery fields when ever a document is to be deleted. I'm +1 on it. I don't think there should be any objections.
        Hide
        Noble Paul added a comment -

        I have removed throwing error if a field is not present

        Show
        Noble Paul added a comment - I have removed throwing error if a field is not present
        Hide
        Shalin Shekhar Mangar added a comment -

        Added tests. I'll commit this shortly.

        Show
        Shalin Shekhar Mangar added a comment - Added tests. I'll commit this shortly.
        Hide
        Shalin Shekhar Mangar added a comment -

        Changed the flags to $deleteDocById and $deleteDocByQuery. In summary, here are the changes:

        Special flags introduced for deleting documents by query or id, skipping rows and stopping further transforms. Use $deleteDocById, $deleteDocByQuery for deleting by id and query respectively. Use $skipRow to skip the current row but continue with the document. Use $stopTransform to stop further transformers. New methods are introduced in Context for deleting by id and query.

        Show
        Shalin Shekhar Mangar added a comment - Changed the flags to $deleteDocById and $deleteDocByQuery. In summary, here are the changes: Special flags introduced for deleting documents by query or id, skipping rows and stopping further transforms. Use $deleteDocById, $deleteDocByQuery for deleting by id and query respectively. Use $skipRow to skip the current row but continue with the document. Use $stopTransform to stop further transformers. New methods are introduced in Context for deleting by id and query.
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 755897.

        Thanks Fergus and Noble!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 755897. Thanks Fergus and Noble!
        Hide
        Shalin Shekhar Mangar added a comment -

        I added another test for the delete functionality.

        Committed revision 756130.

        Show
        Shalin Shekhar Mangar added a comment - I added another test for the delete functionality. Committed revision 756130.
        Hide
        Noble Paul added a comment -

        $skipRow should not result in child entities being processed

        Show
        Noble Paul added a comment - $skipRow should not result in child entities being processed
        Hide
        Noble Paul added a comment -

        cleaned up a bit

        Show
        Noble Paul added a comment - cleaned up a bit
        Hide
        Shalin Shekhar Mangar added a comment -

        Committed revision 764379.

        Thanks Noble!

        Show
        Shalin Shekhar Mangar added a comment - Committed revision 764379. Thanks Noble!
        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Noble Paul
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development