projectblacklight / blacklight_advanced_search

Advanced search plugin for Blacklight
http://projectblacklight.org
Other
24 stars 25 forks source link

${var} search field syntax generating invalid solr query #97

Open ConorSheehan1 opened 5 years ago

ConorSheehan1 commented 5 years ago

I've noticed that if I have a search field with a filter using ${var} syntax (like demo.blacklight.com), blacklight advanced search throws an error for queries with multiple fields.

400 Bad Request
Error: 'org.apache.solr.search.SyntaxError: Expected identifier at pos 68 str=\'{!dismax qf=

The generated query looks like this:

q=_query_:"{!dismax }test" OR _query_:"{!dismax qf=${title_qf} pf=${title_pf}}test"

If I use $var syntax (like in the advanced_search readme), it works fine.

I'm not sure what the significance of $var vs ${var} is. Is this an dismax vs edismax thing? Will there be support for advanced search with ${var} syntax?