Hi,

I have a query which is failing:

Request: GET /solr/emu_object/select?start=0&rows=60&&q=&qf=search_tier_1%5E4%20search_tier_2%5E3%20search_tier_3%5E2%20search_tier_4%5E1&page=0&defType=edismax&wt=json&facet=true&facet.sort=count&facet.mincount=1&facet.field=obj_place_name&facet.field=obj_party_name&facet.field=obj_date_year&facet.field=obj_material&facet.field=obj_date_data&facet.field=project&facet.field=obj_collectiontitle&facet.field=obj_type&f.obj_place_name.facet.limit=100&f.obj_place_name.facet.mincount=1&f.obj_party_name.facet.limit=100&f.obj_party_name.facet.mincount=1&f.obj_date_year.facet.limit=100&f.obj_date_year.facet.mincount=1&f.obj_material.facet.limit=20&f.obj_material.facet.mincount=1&f.obj_date_data.facet.limit=100&f.obj_date_data.facet.mincount=1&f.project.facet.limit=100&f.project.facet.mincount=1&f.obj_collectiontitle.facet.limit=-1&f.obj_collectiontitle.facet.mincount=1&f.obj_type.facet.limit=100&f.obj_type.facet.mincount=1&q.alt=%28obj_party_name%3A%22Hon%20Nicholas%20%27Nick%22%20F.%20Greiner%22%29&json.nl=map

Response: {"error":{"msg":"org.apache.solr.search.SyntaxError: Cannot parse '(obj_party_name:\"Hon Nicholas 'Nick\" F. Greiner\")': Lexical error at line 1, column 50. Encountered: <EOF> after : \"\\\")\"","code":400}} ;

The part that is crashing is
q.alt=%28obj_party_name%3A%22Hon%20Nicholas%20%27Nick%22%20F.%20Greiner%22%29

which when decoded is:
q.alt=(obj_party_name:"Hon Nicholas 'Nick" F. Greiner")

The double quote in the middle is not being escaped.

I change the query to:
q.alt=(obj_party_name:"Hon Nicholas 'Nick\" F. Greiner")
and that works correctly.

CommentFileSizeAuthor
#2 qalt_double_quote-2558315-2.patch658 bytesroflcopterDorrie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roflcopterDorrie created an issue. See original summary.

roflcopterDorrie’s picture

Patch to escape double quotes

roflcopterDorrie’s picture

Status: Active » Needs review
roflcopterDorrie’s picture

Issue summary: View changes