如何在Laravel 5.4中使用parsedown(How to use parsedown in Laravel 5.4)
在Laravel 5.4中包含了Composer软件包
"erusev/parsedown": "~1.6"
https://github.com/laravel/framework/blob/5.4/composer.json#L22但我如何在控制器中使用这个类?
In Laravel 5.4 have included Composer package
"erusev/parsedown": "~1.6"
https://github.com/laravel/framework/blob/5.4/composer.json#L22But how I can use this class in controller?
原文:https://stackoverflow.com/questions/42336379
最满意答案
您可以在查询中为完成建议器设置分析器。
默认情况下,分析仪是简单分析仪,仅对字母进行标记。
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-simple-analyzer.html
我相信你需要标准分析仪 -
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-standard-analyzer.html
You can set the analyzer for Completion Suggesters in your query.
By default the analyzer is Simple Analyzer which tokenize on only letters.
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-simple-analyzer.html
I believe you need Standard Analyzer-
https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-standard-analyzer.html
相关问答
更多-
你必须提到过时的文件。 这里描述了在6.1.1上安装ICU分析插件的正确方法,即从$ ES_HOME文件夹运行该命令 bin/elasticsearch-plugin install analysis-icu You must be referring to outdated documentation. The correct way to install the ICU analysis plugin on 6.1.1 is described here, i.e. run this command ...
-
- >您正在运行哪个elasticsearch版本? - >最新版本不支持更新映射类型。 - >如果要更改映射,则需要使用新映射创建新索引,并将数据从旧索引复制到新索引 - >另一个进程:使用新映射插入新字段并在映射中使用copy_to。 例: 'id' => [ 'type' => 'string', 'copy_to' => 'combined' ], ...
-
您可以在查询中为完成建议器设置分析器。 默认情况下,分析仪是简单分析仪,仅对字母进行标记。 https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-simple-analyzer.html 我相信你需要标准分析仪 - https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-standard-analyzer.html You ca ...
-
通过阅读上面的Volodymryrs答案,我能够解决这个问题。 因为匹配“the”,所以找到了匹配的匹配。 我试图添加运算符参数,但不幸的是这并不奏效。 我所做的是使用“match_phrase”,并将我的另外两个匹配字段切换为“term” - 请参阅下面的答案 - [ 'query' => [ 'bool' => [ 'must' => [ [ ...
-
由于viewers只是一个字符串数组,所以不能将其映射为nested类型,但可以简单地将其声明为字符串。 viewers: {type: string, index: not_analyzed} 然后ES将无缝地创建一个字符串数组。 Since viewers is simply an array of strings you cannot map it a nested type but you can simply declare it as a string. viewers: {type: ...
-
然后你可以做这样的事情: { "query": { "bool": { "minimum_should_match": 1, "should": [ { "bool": { "must": [ { "match": { "ticket_group.ticket_type": 1 } ...
-
实现此query_string一种方法是使用特殊的_missing_字段名称创建query_string查询 ,如下所示: { "from": 0, "size": 15, "query": { "query_string": { "query": "_missing_:assignedToEM" } } } 或者还应该使用NOT运算符,如下所示: { "from": 0, "size": 15, ...
-
尝试使用小写索引名称。 它有用吗? 如果没有,您是否可以提供索引文档和映射? 更新:您使用默认分析器,因此您的字段被分解为小写的标记。 未分析TermFilter因此它不匹配。 您可以将TermFilter小写或使用分析的MatchQuery或更改映射并将字段设置为not_analyzed。 Try to use lower case index names. Does it work? If not, can you provide your indexed document and mapping if ...
-
弹性搜索映射错误映射(Elastic Search mapping bad mapping)[2024-03-09]
我想到了。 需要删除第一个“文章”字符串。 并且“PUT”应该发生在http://abc.com/index上 I figured it out. The first "article" string needs to be deleted. And the "PUT" should happen against http://abc.com/index -
弹性搜索中整数类型优于字符串字段类型的优点(Advantage of integer type over string field type in elastic search)[2022-02-24]
实际上你可以使用string_type 。 我个人认为在字符串上使用interger_type没有任何好处。 但是请确保将string映射为not_analyzed ,因此不会分析或标记字段的值。 这样您就可以简单地使用该字段进行聚合 。 也许你应该看看这个详细说明的那个。 同时具有两种字段类型与完成上述操作完全没有任何区别。 You could go with the string_type for both actually. I don't personally see any advantages ...