Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-16

removeField not working as expected

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.8
    • Affects Version/s: None
    • Component/s: None
    • None

      If you call removeField(name) from a BaseDBObject and then call toString(), the fields are still there and only the value is null. I would expect that it would remove all filed and the value.

      E.g.

      if (site.containsKey(SiteDocField.HOMEPAGE_CRAWL_CONTENT.key))

      { site.removeField(SiteDocField.HOMEPAGE_CRAWL_CONTENT.key); }

      The JSON below still contains homec/HOMEPAGE_CRAWL_CONTENT.key

      {"site":

      {"blc":1104883,"tldid":1,"homefu":"http://www.bloomberg.com/","homec":null,"h":"www.bloomberg.com","homert":2072,"_ns":"sites","lhomet":1249578595914,"idxc":1104883,"_id":null,"hsyndf":false,"ta":1249578575882,"lfext":1249578615980,"lidxt":1249578595914,"hcopy":false,"lgpr":1249578595914,"lblct":1249578595914,"homerc":200}

      ,"siteId":"8c779c4797f10c5a1287c0e89cec4ae7"}

            Assignee:
            kristina Kristina Chodorow (Inactive)
            Reporter:
            rn@deftlabs.com Ryan Nitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: