我一直盯着我的显示器太长时间不要问:如何使用Elastic Search PHP库执行多个范围查询?
我试图根据价格标准(少于和多于)和该类别中的产品数量(最少2个产品,仅2个产品等)查询我的指数.
虽然$searchParams['body']['query']['range']['number_of_products'] = ['gte' => $products + 1];
它自己的作品很好,结合了
$searchParams['body']['query']['range']['price'] = [
'gte' => $price['min'],
'lte' => $price['max'],
];
Run Code Online (Sandbox Code Playgroud)
我很难找到一个体面的最新例子,涵盖ES v0.9之后的这个场景,这在我的v1.4.2上失败了.
我如何 - 使用带有TwigBridge(0.4.x)的Laravel 4尝试重定向到带有闪存数据的URL - 请访问Twig模板中的值?
这是我在控制器中的代码:
public function update($id)
{
$profile = DB::table('users')
->where('id', $id)
->update(array(
'email' => Input::get('email'),
'title_id' => Input::get('title_id'),
'first_name' => Input::get('first_name'),
'last_name' => Input::get('last_name')
)
);
return Redirect::to('/profile')
->with('message', array(
'class' => 'success',
'content' => 'Profile successfully updated.'
)
);
}
Run Code Online (Sandbox Code Playgroud)
这是我的看法:
{% extends 'base' %}
{% block title %}Profile :: {% endblock %}
{% block content %}
<div class="page-header">
<h1>Profile</h1>
</div>
{{ dump() }}
{% if flash %}
<div class="{{ flash.class }}">
<a href="#close" …Run Code Online (Sandbox Code Playgroud)