1<?php 2 3include "bootstrap.php"; 4 5$options = array 6( 7 'hostname' => SOLR_SERVER_HOSTNAME, 8 'login' => SOLR_SERVER_USERNAME, 9 'password' => SOLR_SERVER_PASSWORD, 10 'port' => SOLR_SERVER_PORT, 11); 12 13$client = new SolrClient($options); 14 15$query = new SolrQuery(); 16 17$userInput = 'USB/2'; 18 19$escapedUserInput = SolrUtils::escapeQueryChars($userInput); 20 21$query->setQuery('text:'.$escapedUserInput); 22 23echo $query.PHP_EOL; 24