pysolr

Django/python and Apache Solr: pysolr or solrpy?

纵饮孤独 提交于 2019-12-21 17:01:17
问题 brand new on this forum and this is my first post! At work we're starting a project which uses Apache Solr and i'm in charge of the frontend system (Django-based). Our solr database isn't related to any other db engine nor to any models' class, so Haystack isn't good for us (since its strictly related to the models). I was looking at http://code.google.com/p/pysolr/ and http://code.google.com/p/solrpy/ Basically, they're similar. I like more solrpy, since it uses POST requests and we can mask

Pysolr: I continually get json.decoder error when attempting a query

Deadly 提交于 2019-12-12 04:57:50
问题 import pysolr solr = pysolr.Solr('http://replaced_url.abc:8983/solr/#/tran_timings_shard1_replica2/query', timeout=10) results = solr.search('SubmitterId:clientname') When pulling flat files I can go to the solr web interface http://replaced_url.abc:8983/solr/#/tran_timings_shard1_replica2/query and do a simple query of SubmitterId:clientname I've searched for a couple hours now and tried to go by examples, but no matter what I put as the solr.search query variable, I consistently get the

Apache Solr 6.6 replace document instead of update

对着背影说爱祢 提交于 2019-12-11 07:31:03
问题 I have configured solr 6.6.1 for a testing setup. After indexing few documents, I have to update few fields. I am using python client of solr. To update, following is my code snippet import solr def update_solr_index(_id, _value): print solr_conn2.add( id = _id, group2 = _value) core_ulr = "http://localhost:8983/solr/use" solr_conn2 = solr.SolrConnection(core_ulr) update_solr_index(doc_id, field_value) After execution (and commit), all other fields are removed from all documents and only two

How to make atomic updates to solr using pysolr?

醉酒当歌 提交于 2019-12-11 02:20:17
问题 I can't find a decent documentation on how to make updates to solr using pysolr. 回答1: You cannot currently make atomic updates to Solr using PySolr. There is a pull for it: https://github.com/toastdriven/pysolr/pull/99 But it's not yet been merged. Last comment was less than a month ago, if you are interested I'd comment on it - or try to merge the code yourself if you feel up to it. 回答2: As of November 2014 atomic updates are supported with pysolr. Here's a simple example: url_solr = '''http

Django/python and Apache Solr: pysolr or solrpy?

老子叫甜甜 提交于 2019-12-04 08:25:06
brand new on this forum and this is my first post! At work we're starting a project which uses Apache Solr and i'm in charge of the frontend system (Django-based). Our solr database isn't related to any other db engine nor to any models' class, so Haystack isn't good for us (since its strictly related to the models). I was looking at http://code.google.com/p/pysolr/ and http://code.google.com/p/solrpy/ Basically, they're similar. I like more solrpy, since it uses POST requests and we can mask our users queries, but this makes its paginator harder to use (i guess..). Other side, pysolr, thanks

How to add something to PYTHONPATH?

坚强是说给别人听的谎言 提交于 2019-11-29 01:24:10
I downloaded a package (called pysolr 2.0.15) to my computer to be used with Haystack. The instructions asks me to add pysolr to my PYTHONPATH. What exactly does that mean? After extracting the pysolr files, I ran the command python setup.py install and that's about it. What did that do and do I need to do anything else? Thanks for the help! The pythonpath tells python were to look for modules, for example you might have written a library that you want to use in several applications and stored it in the path /mylibs/python/ you would then have to add that path to the pythonpath for python to

How to add something to PYTHONPATH?

倖福魔咒の 提交于 2019-11-27 15:49:51
问题 I downloaded a package (called pysolr 2.0.15) to my computer to be used with Haystack. The instructions asks me to add pysolr to my PYTHONPATH. What exactly does that mean? After extracting the pysolr files, I ran the command python setup.py install and that's about it. What did that do and do I need to do anything else? Thanks for the help! 回答1: The pythonpath tells python were to look for modules, for example you might have written a library that you want to use in several applications and