Skip to content

Commit 98d00c1

Browse files
Merge pull request #317 from daniellienert/bugfix/do-not-escape-unicode
BUGFIX: Do not escape unicode characters for fulltext search
2 parents d87354c + 7ee00e5 commit 98d00c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ matrix:
1313
env: ES=5
1414

1515
before_install:
16-
- export NEOS_TARGET_VERSION=4.0
16+
- export NEOS_TARGET_VERSION=4.3
1717
- cd ..
1818
- if [ "$ES" = 5 ]; then wget --no-check-certificate https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.15.zip && unzip elasticsearch-5.6.15.zip && mv elasticsearch-5.6.15 elasticsearch; fi
1919
- cd elasticsearch
2020
- bin/elasticsearch -d
2121
- cd ..
2222
- git clone https://github.com/neos/neos-base-distribution.git -b ${NEOS_TARGET_VERSION}
2323
- cd neos-base-distribution
24-
- composer require --no-update --no-interaction flowpack/elasticsearch-contentrepositoryadaptor:dev-master
24+
- composer remove --no-update --no-interaction neos/site-kickstarter
25+
- composer require --no-update --no-interaction flowpack/elasticsearch-contentrepositoryadaptor:^5.0
2526
install:
2627
- composer install --no-interaction
2728
- cd ..

Classes/Eel/ElasticSearchQueryBuilder.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
declare(strict_types=1);
43

54
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Eel;
@@ -669,7 +668,7 @@ public function count()
669668
public function fulltext($searchWord, array $options = [])
670669
{
671670
// We automatically enable result highlighting when doing fulltext searches. It is up to the user to use this information or not use it.
672-
$this->request->fulltext(trim(json_encode($searchWord), '"'), $options);
671+
$this->request->fulltext(trim(json_encode($searchWord, JSON_UNESCAPED_UNICODE), '"'), $options);
673672
$this->request->highlight(150, 2);
674673

675674
return $this;

0 commit comments

Comments
 (0)