diff --git a/README.txt b/README.txt index f2b1dc4..49d96f4 100644 --- a/README.txt +++ b/README.txt @@ -5,8 +5,8 @@ features and better performance. Among the extra features is the ability to have faceted search on facets ranging from content author to taxonomy to arbitrary CCK fields. -The module comes with a schema.xml and solrconfig.xml file which should be used -in your Solr installation. +The module comes with a schema.xml, solrconfig.xml, and protwords.txt file which +must be used in your Solr installation. This module depends on the search framework in core. However, you may not want the core searches and only want Solr search. If that is the case, you want to diff --git a/apachesolr.module b/apachesolr.module index 37ac553..f51d8cf 100644 --- a/apachesolr.module +++ b/apachesolr.module @@ -1389,9 +1389,13 @@ function apachesolr_do_query($caller, $current_query, &$params = array('rows' => } // This is the object that does the communication with the solr server. $solr = apachesolr_get_solr(); - // We must run htmlspecialchars() here since converted entities are in the index. - // and thus bare entities &, > or < won't match. - $response = $solr->search(htmlspecialchars($keys, ENT_QUOTES, 'UTF-8'), $params['start'], $params['rows'], $params); + // We must run htmlspecialchars() here since converted entities are in the index + // and thus bare entities &, > or < won't match. Single quotes are converted + // too, but not double quotes since the dismax parser looks at them for + // phrase queries. + $keys = htmlspecialchars($keys, ENT_NOQUOTES, 'UTF-8'); + $keys = str_replace("'", ''', $keys); + $response = $solr->search($keys, $params['start'], $params['rows'], $params); // The response is cached so that it is accessible to the blocks and anything // else that needs it beyond the initial search. apachesolr_static_response_cache($response, $caller);