diff --git a/src/sqlalchemy_solr/solrdbapi/_solrdbapi.py b/src/sqlalchemy_solr/solrdbapi/_solrdbapi.py index becf782..7590168 100755 --- a/src/sqlalchemy_solr/solrdbapi/_solrdbapi.py +++ b/src/sqlalchemy_solr/solrdbapi/_solrdbapi.py @@ -92,6 +92,11 @@ def func_wrapper(self, *args, **kwargs): @staticmethod def substitute_in_query(string_query, parameters): query = string_query + + # Statement semi-colon is not supported in Solr syntax + if query.endswith(";"): + query = query[:-1] + for param in parameters: if isinstance(param, str): query = query.replace("?", f"{param!r}", 1)