ptwobrussell / Mining-the-Social-Web

The official online compendium for Mining the Social Web (O'Reilly, 2011)
http://bit.ly/135dHfs
Other
1.21k stars 491 forks source link

couch db lucene mailboxes__couchdb_lucene.py error #62

Closed toori67 closed 11 years ago

toori67 commented 11 years ago

I download file at http://zaffra.com/static/matthew/enron.mbox.json.gz. And I tried example 3-12. When I try to make index by_content, lucene print this error.

I figure out there are some enron mail data that don't contain 'parts' element.

So I fixed script.

if(doc.parts){
    for(var i=0;i<doc.parts.length;i++){
        ret.add(doc.parts[0].content); 
    }
}

This works fine.

ptwobrussell commented 11 years ago

This is very helpful. Thank you for debugging it. Do you also want to submit a pull request so that I can merge it into the codebase for everyone else to benefit from (and you'd get public kudos for contributing?) or do you want me to merge it in?

toori67 commented 11 years ago

though I'm not that good at git... So if you don't mind would you murge that code?

Anyway I'm fanatic reader of your book :)

2013년 7월 7일 일요일에 Matthew A. Russell님이 작성:

This is very helpful. Thank you for debugging it. Do you also want to submit a pull request so that I can merge it into the codebase for everyone else to benefit from (and you'd get public kudos for contributing?) or do you want me to merge it in?

— Reply to this email directly or view it on GitHubhttps://github.com/ptwobrussell/Mining-the-Social-Web/issues/62#issuecomment-20557150 .

++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++

ptwobrussell commented 11 years ago

@toori67 Sure - I can merge it for you. Just remind me of the file you modified?

toori67 commented 11 years ago

file : mailboxes__couchdb_lucene.py line 21~23.

this file.

2013년 7월 7일 일요일에 Matthew A. Russell님이 작성:

@toori67 https://github.com/toori67 Sure - I can merge it for you. Just remind me of the file you modified?

— Reply to this email directly or view it on GitHubhttps://github.com/ptwobrussell/Mining-the-Social-Web/issues/62#issuecomment-20561597 .

++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++