#187 new
Ryan Wallace

Facet prefixes with slashes are escaped

Reported by Ryan Wallace | August 10th, 2011 @ 01:19 PM

I have a hierarchical string facet where each element in the hierarchy is separated with a slash.

e.g. 0/Canada, 1/Canada/British Columbia

Sunspot's AbstractFieldFacet is escaping the prefix on line 29 of abstract_field_facet.rb. I'm not sure of the reason for this but it prevents me from being able to specify that the facet should have a prefix of '0/' (it instead looks for '0\/').

Monkeypatching to remove the escaping fixes the problem.

Comments and changes to this ticket

  • Ryan Wallace

    Ryan Wallace October 14th, 2011 @ 04:04 PM

    This may be an upstream issue in RSolr. you are using an escape method from RSolr which escapes anything except word characters. It looks like there used to be a method called "lucene_escape" which was a bit more precise but it has been commented out. I'm not sure why?

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Awesome Solr interaction for Ruby

People watching this ticket