#014159: ezcSearchQueryBuilder() can't handle colons in search strings for Solr

Description:

When searching for a string, the ezcSearchQueryBuilder doesn't put the string in quotes so that the query for Solr looks like

id_t:http://blahblahurl

and Solr gives error 400.

There are 2 solutions to this:
1. Quote the colon so that the Solr-Query looks like id_t:http\://blahblah
2. Put the string in quotes so that the Solr-Query looks like id_t:"http://blahblahurl"


Environment:

ezComponents Version: ezc/eZComponents-beta vom PEAR channel
ezcSearch Version: 1.0.2
Operating System: Linux
PHP Version: 5.2.8
Solr Version: 1.3.0


Steps to Reproduce:

$handler = new ezcSearchSolrHandler('localhost', 8983, '/solr');
$manager = new ezcSearchEmbeddedManager;
$session = new ezcSearchSession( $handler, $manager );
$q = $session->createFindQuery('SomeType');  // <~~~ adjust to your needs
$qb = new ezcSearchQueryBuilder();
$qb->parseSearchQuery($q, '"http://blahblah"', array('id'));
print_r($qb);  // notice the missing quotes in whereClauses
$result = $session->find($q);

- Attachments

No attachments for this issue.


- Comments

Fixed in rev. 9645: http://svn.ezcomponents.org/viewvc.cgi?view=rev&revision=9645url

#259574 by Derick Rethans on December 18th, 2008 [Permanent Link]

- History
Properties
Type Bug
Priority Medium
Component Components » Search
Affects 1.0 - Search 1.0
Fix Version 2008.2 - eZ components 2008.2
Reporter Markus Birth
Responsible Derick Rethans
Status 0 Closed
Resolution Fixed
Created December 17th, 2008
Updated December 18th, 2008
Resolved December 18th, 2008
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels