首页 \ 问答 \ PHP elasticsearch部分匹配(PHP elasticsearch partial match)

PHP elasticsearch部分匹配(PHP elasticsearch partial match)

我想用elasticsearch搜索并用php显示结果。 我想在前面的mysql中进行部分匹配:

select * from table_name where title like '%abc%'

但我的代码不起作用:

$params = [
    'index' => 'my_index',
    'type' => 'my_type',
    'body' => [
        'query' => [
            'match' => [
                'title' => '.*abc.*'
            ]
        ]
    ]
];

i want to search with elasticsearch and show out the result with php. i want to make partial match like it's in mysql for ex:

select * from table_name where title like '%abc%'

But my codes doesn`t work:

$params = [
    'index' => 'my_index',
    'type' => 'my_type',
    'body' => [
        'query' => [
            'match' => [
                'title' => '.*abc.*'
            ]
        ]
    ]
];

原文:https://stackoverflow.com/questions/46592860
更新时间:2023-11-24 16:11

最满意答案

尝试这个工具Delphi DFM properties remover ,与旧版本的德尔福工作,但也许可以帮助你。


Try this tool Delphi DFM properties remover, works with old versions of delphi but maybe can help you.

相关问答

更多
  • 尝试这个工具Delphi DFM properties remover ,与旧版本的德尔福工作,但也许可以帮助你。 Try this tool Delphi DFM properties remover, works with old versions of delphi but maybe can help you.
  • 基本的DFM格式在Delphi版本之间兼容。 它是一个序列化的对象树,每个对象都有一组属性。 但是,保存的属性可以从一个版本更改为另一个版本。 通常,将DFM从早期版本加载到较新版本是安全的,但不一定相反。 Explicit*属性是在Delphi 7之后添加的新内容的示例。 如果表单设计者抛出“未找到类”错误,则表示该表单是使用尚未在IDE中注册的组件保存的,因此IDE无法加载它。 您需要找到该组件所在的软件包并在IDE中Install它。 The basic DFM format is compatibl ...
  • 您可以通过编写自己的方法来创建自己的方法来读取和写入属性,以执行流与流之间的二进制数据流,并使用DefineProperties和DefineBinaryProperty将它们注册到VCL / RTL流系统。 JEDI JVCL单元JVXSlider.pas中有一个易于理解的示例: // interface type TJvCustomSlider=class(TJvCustomControl) private procedure ReadUserImages(Stream: TStream ...
  • 有可能做你想做的事,但我无法想象你为什么想要。 当我们将应用程序从D6移植到D2010时,我们共享了可在两个版本中构建的源代码。 这纯粹是一种过渡性安排。 一旦我们对D2010港口充满信心,我们就切断了脐带。 在这一点上,我们欣然接受了D2010的新功能。 为了使这项工作,我们使用了以下拐杖: Helper函数用于减轻ANSI / Unicode差异。 单位别名来处理单位重命名。 例如,主题单元将名称从D6更改为D2010,单元别名功能隐藏了该名称。 有条件的代码。 所有这些都是需要的,因为我们有一个移植任 ...
  • 你需要的不仅仅是一个dfm检查器。 如果对象读取它无法识别的属性,则会创建错误。 您可能已更新了一组(外部)控件,并删除了一些属性。 如果这些是外部控件,您可能会获得已删除属性的列表。 接下来,您可以使用像grep(或其他搜索工具)这样的工具来查找具有该属性的dfm文件。 因此,您知道要打开和测试哪些表单。 还有一些其他原因可能会发生此错误: 有人用手编辑了dfm文件并犯了一个错误。 TForm后代变成了TFrame后代。 You need more than a dfm checker. The erro ...
  • 您可以使用GExperts的ComponentsToCode功能 You can use the ComponentsToCode function from GExperts
  • 如果组件位于表单上,但在源文件的表单定义中没有条目,则会出现此错误。 大多数情况下,当我从其他表单复制并粘贴时。 最简单的解决方案是选择组件,剪切它,然后粘贴回去。 保存时,组件的单元将被添加到源中,并且当您再次运行它时,它们都会正常工作。 I get this error if a component is on the form, but doesn't have an entry in the form definition in the source file too. Most often whe ...
  • .dfm文件包含Form的属性值和子对象定义。 与.dfm文件具有相同基本文件名的.dfm文件包含Form的Delphi Pascal源代码,其事件处理程序等。 要使用这些文件,只需创建一个Delphi VCL Forms项目并将.pas文件添加到项目中。 每个.pas文件都应该有一个{$R *.dfm}编译器指令,以链接到其关联的.dfm文件。 编译器将每个.pas文件编译成.dcu文件并将其链接到最终的可执行文件,并且还将为每个.dfm文件的内容创建单独的二进制资源,并将它们链接到可执行文件中。 当运行 ...
  • TComponent的属性Left和Top确实不存在。 在ReadProperty和WriteProperties使用的DefineProperties中为设计器设置。 看看classes.pas。 The properties Left and Top for TComponent do not exist really. The are set for the designer in DefineProperties used by ReadProperty and WriteProperties. T ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。