Hello everyone.
I've been reading some posts on this forum and I thought it best to start my
own post as our situation is different from evveryone elses, isn't it always
:-)
We've got a django powered website that has solr as it's search engine.
We're using the example solr application and
Hello everyone
Loving solr, got an idiot question for you.
I have been manually deleting our index in the python interpretor when
testing
from solr import SolrConnection
c = SolrConnection(host='localhost:8983', persistent=False)
allgone = '[ * : * ]'
c.deleteByQuery(query=allgone)
roopesh, thank you very much
roopesh-2 wrote:
This should work :
c.deleteByQyery('id:[* TO *]')
c.commit()
Regards
Roopesh
vanderkerkoff wrote:
Hello everyone
Loving solr, got an idiot question for you.
I have been manually deleting our index in the python interpretor when
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 =
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
I/my boss and me worked it out.
The delete funtion in solr.py looks like this
def delete(self, id):
xstr = 'deleteid'+self.escapeVal(`id`)+'/id/delete'
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
Hi Mike, Brian
Thanks for helping with this, and for clearing up my misunderstanding. Solr
the python module and Solr the package being two different things, I've got
you.
The issues I have are compounded by the fact that we're hovering between
using the Unicode branch of Django and the older
Cheesr Mike, read the page, it's starting to get into my brian now.
Django was giving me unicode string, so I did some encoding and decoding and
now the data is getting into solr, and it's simply not passing the
characters that are cuasing problems, which is great.
I'm going to follow the same
see, and the data is definately in the index as
I can now search for it.
vanderkerkoff wrote:
2 little things, I'm getting an error when it's trying to optimise the
index
AttributeError: SolrConnection instance has no attribute 'optimise'
You don't know what that is about do you?
I'm
Hello Hoss
Thanks for replying, I tried what you suggested as the iniital step of my
troubleshooting and it outputs it fine.
It was what I suspected initially as well, but thanks for the advice.
hossman_lucene wrote:
: I'm running solr1.2 and Jetty, I'm having problems looping through a
Hi Yonik
Here's the output from netcat
POST /solr/update HTTP/1.1
Host: localhost:8983
Accept-Encoding: identity
Content-Length: 83
Content-Type: text/xml; charset=utf-8
that looks Ok to me, but I am a bit twp you see.
:-)
Yonik Seeley wrote:
On 6/13/07, vanderkerkoff [EMAIL PROTECTED
Hi Brian
I've now set the mysqldb to be default charset utf8, and everything else is
utf8. collation etc etc.
I think I know what the problem is, and it's a really old one and I feel
foolish now for not realising it earlier.
Our content people are copying and pasting sh*t from word into the
Hello everyone
I'm running solr1.2 and Jetty, I'm having problems looping through a mysql
database with python and putting the data into the solr index.
Here's the error
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 369:
ordinal not in range(128)
I think that means that
13 matches
Mail list logo