A lightweight Python library for connecting to an Apache SOLR instance.
Questions tagged [pysolr]
98 questions
0
votes
0 answers
Spatial filter not working in Apache solr cloud after doing atomic updates
I have a collection in apache solr cloud (version 9.2) which contain approx 4.3 million documents.
Each document has approx 11 fields. Id, cityid, countyid, color, lastupdated, latlong, geometryrpt etc. Where is of type string and unique key,…

Neha Sharma
- 1
- 1
0
votes
0 answers
Unable to retrieve results using pysolr.search() with grouping
Expected behavior:-
I expect to retrieve search results grouped by the specified field (sno) based on the provided query. The results should be similar to what I see in the Solr UI.
Actual behavior:-
No search results are returned. The results…
0
votes
1 answer
Pysolr search multiple queries with and
How to search multiple queries and require the "and" for q.op?
import pysolr
solr = pysolr.Solr('..url../solr/'+name,always_commit=True)
solr.search("test:test")
I want to add searching for also "url:http://test.com" as an "AND" q.op parameter.

msj121
- 2,812
- 3
- 28
- 55
0
votes
0 answers
Solr cloud connection failure
I am connecting to solr cluster using SolrCloud with Kerberos authentication enabled and getting connection failures every next day after the app is not used overnight.
2022-09-08 16:56:13,754 - kazoo.client - WARNING - Connection dropped: socket…

Chirdeep Tomar
- 4,281
- 8
- 37
- 66
0
votes
0 answers
How to do faceting with sub-facet and aggregate functions using PySolr
I have a facet query working with count but I would like to do a sum on a field on the data already grouped by the facet.field. I have the json facet query working in the browser but no luck with PySolr.
import pysolr
import pprint
conn =…

Chirdeep Tomar
- 4,281
- 8
- 37
- 66
0
votes
0 answers
pysolr is taking time first time after the solr restart
pysolr is taking time first time after the solr restart. Scenario is like this.
1)Restart Solr server
2)Execute the query directly in solr is taking 4 sec
3)when we are trying to execute the same query using pysolr, it is taking 300 seconds or more…

Joji
- 1
- 1
0
votes
1 answer
unicode' object has no attribute 'items'
I am updating the document in solr using pysolr python. I am taking one field data from solr document and after updating it i am ingesting it again using
solr.add(dict)
Basically i am ingesting a dictionary in solr again.
However i am getting this…

pkk
- 379
- 6
- 18
0
votes
0 answers
pysolr.SolrError: Solr responded with an error (HTTP 409): [Reason: version conflict for expected= actual=]
I am trying to retrieve the documents with a Solr search and then try to add that same document with that same id back into Solr. In doing this, I get a version conflict. Basically i am adding url link as shown in the code below.
solr =…

pkk
- 379
- 6
- 18
0
votes
1 answer
How do I prevent a version conflict when reindexing/adding the same document back into the Solr core?
I have a Solr core containing 60k documents. I have updated the field types in the schema.xml and I do not want to delete the Solr core for reindexing. I am trying to retrieve the documents with a Solr search and then try to add that same document…

blah
- 674
- 3
- 17
0
votes
0 answers
use min_rf feature by pysolr package
I using Pysolr package in order send data to Apache Solr.
Apache Solr has one feature called min_rf (Doc)
I used min_rf in my java code but Pysolr throws an error.
Do Pysolr package support this feature? How can I use this feature in code?

Alihossein shahabi
- 4,034
- 2
- 33
- 53
0
votes
1 answer
Solr Question about Loading Changes to Schema
I'm new to Solr and received the following error when adding a document through pysolr:
pysolr.SolrError: Solr responded with an error (HTTP 400): [Reason: ERROR: [doc=bc4aa768-6f35-4888-80e0-1578d9971b3c] Error adding field…

user3684314
- 707
- 11
- 31
0
votes
0 answers
How to retrieve child value with pysolr
Good day,
First i am quite unfamiliar with solr.
I am using solr 6.6.6, python 3.7 and pysolr (the latest version).
I have a many documents with the following format:
pysolr.add({
'first_name': 'Jane',
'last_name': 'Doe',
'contact': {
…

Emile
- 345
- 2
- 11
0
votes
1 answer
Apache Solr using Python
I'm new to Apache Solr. I get an error when I add the documents using pysolr package in python.
I have tried following:
from __future__ import print_function
import pysolr
solr = pysolr.Solr('http://localhost:8983', timeout=10)
solr.add([
{
…

Heena
- 61
- 2
- 10
0
votes
0 answers
Solr server keeps going down while indexing (millions of docs) using Pysolr
I've been trying to index a lot of documents on Solr (~200 million docs). I use Pysolr to do the indexing. However, the Solr server keeps going down while indexing (sometimes after 100 million documents have been indexed, sometimes after ~180…

ash
- 63
- 1
- 8
0
votes
1 answer
I want to run a query in solr having the special character & and %
I am having trouble running a query using Pysolr when & and % appear in the query. The rest of the special characters can be handled using a '\' but '&' and '%' are a different case. the following query sends an error, but when & and % are removed…

Rohan Garg
- 35
- 5