symfony-cmf / search-bundle

UNMAINTAINED - search Bundle for the Symfony CMF project integrating with LiipSearchBundle
http://cmf.symfony.com/
8 stars 10 forks source link

can't search for special character #23

Closed joizjonas closed 10 years ago

joizjonas commented 10 years ago

Hey

if i search for test' i get an error like: HTTP 400: Query: SELECT a.[jcr:uuid] AS uuid, a.[phpcr:class] AS class, a.title, a.body, a.tags FROM [nt:unstructured] AS a WHERE (ISDESCENDANTNODE(a, [/cms/content]) AND ((CONTAINS(a.title, 'test'') OR CONTAINS(a.body, 'test'')) OR CONTAINS(a.tags, 'test'(*)')))

and if i search for test! or special characters i get: HTTP 403: Invalid full text search expression: test!

should it not somewhere in Symfony\Cmf\Bundle\SearchBundle\Controller\Phpcr\SearchController be escaped like on line 119 $this->buildQuery($qb, $query, $page, $lang);

We are using: "symfony/symfony": "2.4." "liip/search-bundle": "1.0." "symfony-cmf/symfony-cmf": "1.1." "symfony-cmf/search-bundle": "1.0." "doctrine/phpcr-bundle": "1.1.", "doctrine/phpcr-odm": "1.1.", "phpcr/phpcr-utils": "1.1.*",

thanks in advanced for looking into this

dbu commented 10 years ago

this should be fixed by https://github.com/phpcr/phpcr-utils/pull/115 once its merged. can you try the PR branch in your dev setup and report if its really fixing it?

lsmith77 commented 10 years ago

ping

joizjonas commented 10 years ago

Sorry for the late response. It works now. Thanks alot