Re: Deleting from index via web

2007-07-12 Thread Mike Klaas
On 12-Jul-07, at 6:33 AM, vanderkerkoff wrote: I/my boss and me worked it out. The delete funtion in solr.py looks like this def delete(self, id): xstr = ''+self.escapeVal(`id`)+'' return self.doUpdateXML(xstr) As we're not passing an integer it get's all c*nty booby, technical term

Re: Deleting from index via web

2007-07-12 Thread vanderkerkoff
I/my boss and me worked it out. The delete funtion in solr.py looks like this def delete(self, id): xstr = ''+self.escapeVal(`id`)+'' return self.doUpdateXML(xstr) As we're not passing an integer it get's all c*nty booby, technical term. So if I rewrite the delete to be like this def

Re: Deleting from index via web

2007-07-12 Thread vanderkerkoff
ok, I'm now printing out the xstr variable that the delete in solr.py uses when it's trying to delete. it's coming out like this 'news:39' Those quotes look suspicious Going to work out how to switch more debugging on in solr now so I can see what's going on exactly -- View this message in con

Re: Deleting from index via web

2007-07-12 Thread vanderkerkoff
Different tactic now adding like this idstring = "news:%s"; % self.id c.add(id=idstring,url_t=e_url,body_t=body4solr,title_t=title4solr,summary_t=summary4solr,contact_name_t=contactname4solr) c.commit(optimize=True) Goes in fine, search results show an ID of news:36 Delete like this delidstri

Re: Deleting from index via web

2007-07-12 Thread vanderkerkoff
Done some more digging about this here's my delete code def delete(self): from solr import SolrConnection c = SolrConnection(host='localhost:8983', persistent=False) e_url = '/news/' + self.created_at.strftime("%Y/%m/%d") + '/' + self.slug e_url = e_url.encode('as