I'm trying to install this software, a few scripts for searching in a local mongodb database: https://github.com/wimremes/cve-search/blob/master/README.md
Since the search.py script fail miserably, I'm trying to put some index as suggested:
db.cpe.ensureIndex( {id:1 } )
db.cves.ensureIndex( {id:1} )
db.cves.ensureIndex( {vulnerable_configuration:1} )
db.vfeed.ensureIndex( {id:1} )
But this code is not working: ensureIndex fail with this error:
File "build/bdist.linux-i686/egg/pymongo/collection.py", line 1672, in __call__
TypeError: 'Collection' object is not callable. If you meant to call the 'ensureIndex' method on a 'Collection' object it is failing because no such method exists.
and ensure_index( {id:1})
return this:
TypeError: if no direction is specified, key_or_list must be an instance of list
What shoud I do for ceating new indexes?