Slashes in query are reducing accuracy of my results

29 views
Skip to first unread message

Michael Connors

unread,
Mar 24, 2015, 10:57:10 AM3/24/15
to python-...@googlegroups.com
Hi,

I have just started using Solr and Sunburnt.

I am using the latest Solr 5 and the latest version of Sunburnt (0.6) which is available for python 2.7 via pip.

I noticed that there was a significant difference between the number of results returned if I queried solr directly with a curl script, and the number returned using sunburnt. A lot of relevant results are completely dropped. My results are dropping from 50 to 0 in some cases. I discovered from the Solr logs, that sunburnt is putting slashes before hyphens, spaces and other characters. I can't see anyway to prevent this behaviour.

Below is the code I am using to make the query:

result = solr_interface.query(
solr_interface.Q(name=name)
| solr_interface.Q(name_loose_2=name)
| solr_interface.Q(name_normal=name)**3
| solr_interface.Q(name_exact=name)**5
).field_limit(score=True, all_fields=True).execute()


Is there something I am doing wrong here? Is there anyway to prevent this from occurring.

Regards,
Michael

Pippo Pluto

unread,
Oct 14, 2015, 12:03:52 PM10/14/15
to Python Sunburnt
I have the same problem, it would be great to have at least a hint from anyone.
Reply all
Reply to author
Forward
0 new messages