Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I work on the data dump from December 2011, and I have encountered two things that I need to ask about.


In the README, it says that the attribute PostTypeId can only be 1 for the questions and 2 for the answers, but I found that there are another possibilities (3, 4, 5, 6, and 7). So what are they?

Second (it's more a remark):

I found that sometimes there isn't an answer corresponding to the question's AcceptedAnswerId.

share|improve this question
Not all questions have accepted answers. – Manishearth May 9 '12 at 15:47
Some accepted answers may have been deleted, without a new answer being accepted – Flexo May 9 '12 at 15:50
up vote 8 down vote accepted

You can query Data Explorer for the list of PostTypeId values:

Id Name                
-- ------------------- 
1  Question            
2  Answer              
3  Wiki                
4  TagWikiExcerpt      
5  TagWiki             
6  ModeratorNomination 
7  WikiPlaceholder     
8  PrivilegeWiki  

Also check out Database schema documentation for the public data dump and SEDE, which has similar information (although the list of post types seems to be a bit out of date at the moment).

The README should also be updated, but the way the data dump is being distributed is changing, so I'm not sure what impact that will have on how this kind of information is made available.

I found that sometimes there isn't an answer corresponding to the question's AcceptedAnswerId

The data dump does not contain deleted content, so presumably the corresponding answers were removed by the owner or through moderation. I guess the export process doesn't remove invalid AcceptedAnswerId values, but I'm not sure that there's necessarily a reason it should.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .