summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-10-02 13:57:01 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-10-02 13:57:01 -0100
commit059d68fc4d62c27b593c584fe2f4682ce4922409 (patch)
tree7d36e030b57f1ce967cff5fb7b4be77968fbf571 /lib
parenteca50cd1680d203da5039ffab6edba274532808e (diff)
parse '#' in case of search on hashtag
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Service/SearchService.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Service/SearchService.php b/lib/Service/SearchService.php
index db033cea..28f6f524 100644
--- a/lib/Service/SearchService.php
+++ b/lib/Service/SearchService.php
@@ -132,6 +132,10 @@ class SearchService {
return $result;
}
+ if (substr($search, 0, 1) === '#') {
+ $search = substr($search, 1);
+ }
+
try {
$exact = $this->hashtagService->getHashtag($search);
$result['exact'] = $exact;
@@ -161,6 +165,7 @@ class SearchService {
return $result;
}
+ // TODO : search using FullTextSearch ?
return $result;
}