def doc_number(id)
      @dir.synchronize do
        ensure_reader_open()
        term_doc_enum = @reader.term_docs_for(@id_field, id.to_s)
        return term_doc_enum.next? ? term_doc_enum.doc : nil
      end
    end
def doc_number(id)
      @dir.synchronize do
        ensure_reader_open()
        term_doc_enum = @reader.term_docs_for(@id_field, id.to_s)
        return term_doc_enum.next? ? term_doc_enum.doc : nil
      end
    end
search for the first document with +arg+ in the +id+ field and return it's internal document number.
 The +id+ field is either :id or whatever you set
 :id_field parameter to when you create the Index object.