Questions tagged [pysolr]

A lightweight Python library for connecting to an Apache SOLR instance.

98 questions
1
vote
1 answer

Solr 9: Dense Vector input being converted to pdouble format

I passed a dense vector to Solr9 for indexing but it takes the values passed and put them into a variable whose data type is pdoubles. I have made changes to the managed-schema.xml to identify the field named vector as a knn_vector, but solr…
1
vote
1 answer

java.lang.ClassNotFoundException: solr.LatLonType when starting solr with a schema from django build_solr_schema

I want to connect a search functionality to Django. I use django-haystack and solr. with a newly created Solr core I get the following error when starting Solr with a new schema.xml generated from python manage.py build_solr_schema Caused by:…
Nwawel A Iroume
  • 1,249
  • 3
  • 21
  • 42
1
vote
0 answers

pysolr search result different from apache solr cloud result with the same query

I have a query in pysolr and which is weird that the result is different from what I query in solr cloud. In pysolr query="filename:(articles\\56.txt OR articles\\400.txt OR articles\\304.txt) ^20 AND filtered:(empire OR collapse OR Alexander OR 's…
Grace
  • 11
  • 3
1
vote
1 answer

TypeError: index_queryset() got an unexpected keyword argument 'using'

Django==3.2.5 django-haystack==3.0 pysolr==3.9.0 Solr = 8.9.0 I am following the tutorial as in https://django-haystack.readthedocs.io/en/master/tutorial.html to create an Django application with Solr. While executing ./manage.py rebuild_index, I…
Rupal Shah
  • 314
  • 1
  • 10
1
vote
0 answers

PySpark map function - send n rows instead of one to build a list

I am using Spark 3.x in Python. I have some data (in millions) in CSV files that I have to index in Apache Solr. I have deployed pysolr module for this purpose import pysolr def index_module(row ): ... solr_client = pysolr.Solr(SOLR_URI) …
Hafiz Muhammad Shafiq
  • 8,168
  • 12
  • 63
  • 121
1
vote
2 answers

Using pysolr getting 400 error when trying to add data to solr

Using pysolr trying to add document to solr with Python3.9 and getting below error 400 even with only 1 or 2 fields. The fields that I'm using here are dynamic fields. No issue with connecting to solr. #/usr/bin/python import pysolr solr =…
rajendrau
  • 38
  • 5
1
vote
1 answer

How to transform a Solr date back to a python-readable date e.g. 'datetime' and vice versa?

Is there an easy/efficient way of converting the 'Current Solr date' to the 'Desired output' shown below ? I thought of using regex or string methods to clean up the Solr dates but if there is a method to use in Python that converts these dates…
blah
  • 674
  • 3
  • 17
1
vote
2 answers

How do I check if solr is running or no using python?

I am using pysolr library and I want to check if solr is running or no and to switch between solr and other search engine. I found similar question and I tried many suggestions and didn't work. How to know whether solr server is running or not How…
Ana
  • 29
  • 9
1
vote
0 answers

org.apache.solr.common.SolrException: Bad contentType for search handler :application/xml; charset=UTF-8

my current solr version is 8.3.* and using pysolr to search in solr. here is my code solr_new = pysolr.Solr('my solr url') feeds_new = solr_new.search("id:325387975") search line throws exception Bad contentType for search handler…
1
vote
1 answer

Solr weird search behaviour

I am having lots of solr document indexed which has field uri = nntp://msnews.microsoft.com/microsoft.public.windows.server.sbs but when i search with query uri:nntp\://msnews.microsoft.com/microsoft.public.windows.server.sbs It returns zero…
Mohit Ranka
  • 4,193
  • 12
  • 41
  • 41
1
vote
1 answer

Error executing solr-to-es in Anaconda: ModuleNotFoundError: No module named 'solrSource'

I am trying to run solr-to-es (https://github.com/o19s/solr-to-es) in Anaconda environment. I run the setup.py without errors, then when trying to execute "solr-to-es -h", I get "No module named 'solrSource'". I don't get this error when with a…
1
vote
1 answer

Process facet.pivot Data in Solr/Python

I am querying a Solr core with this url: select?q=*:*&rows=0&facet=on&facet.limit=-1&facet.mincount=0&facet.pivot=brand,series,sub_series Using the Facet Pivot feature Partial JSON response, notice how the fields are nested…
Avi Kaminetzky
  • 1,489
  • 2
  • 19
  • 42
1
vote
1 answer

Python: Access data from Solr using Pysolr

I am using simple Python script to fetch example data from Solr using Pysolr. First I created my core using the following [user@user solr-7.1.0]$ ./bin/solr create -c json_db WARNING: Using _default configset. Data driven schema functionality is…
muazfaiz
  • 4,611
  • 14
  • 50
  • 88
1
vote
1 answer

Saving data into solr with pysolr get rejected 'AttributeError: 'str' object has no attribute 'items''

I'm using pysolr to save a list of classes into my local solr database, my problem is that when i encode my list of classes with jsonpickle, the query is rejected with this message, although if i print the json generated by josnpickle i get no…
Progs
  • 1,059
  • 7
  • 27
  • 63
1
vote
1 answer

Index large document with Solar causes exception

I am trying to add documents to Solr (5.3.2) with pysolr. I generate a simple JSON object containing a large text and some metadata (date, author...) then I try to add that to Solr. My issue is that beyond a certain size, Solr will fail to index the…
user2969402
  • 1,221
  • 3
  • 16
  • 26