Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

return highlight to response#94

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Akiler520 wants to merge1 commit intobasemkhirat:master
base:master
Choose a base branch
Loading
fromAkiler520:master

Conversation

@Akiler520
Copy link

@Akiler520Akiler520 commentedAug 22, 2018
edited
Loading

return highlight to response

e.g.

    `$json = '{            "query" : {                    "match": { "name": "淳于理群" }            },            "highlight" : {                "fields" : {                    "name" : {}                 }            }        }';    $result = json_decode($json);    $documents = ES::type('product_list')->body($result)->get();    if ($documents){        foreach ($documents as $document) {            var_dump(json_encode($document->attributes));exit;        }    }

`

result:

    {        "name":"淳于理群",        "last_name":"",        "age":57,        "about":"淳于理群很喜欢足球,喜欢看报纸,也喜欢游泳",        "interests":[                "上网聊天",                "滑雪"            ],        "_index":"product",        "_type":"product_list",        "_id":"06uFW2UB12PvfbBPiLfC",        "_score":18.34602,        "_highlight":{                "name":[                    "<em>淳</em><em>于</em><em>理</em><em>群</em>"                ]        }    }

return highlight
@Akiler520Akiler520 changed the titleUpdate Query.phpreturn highlight to responseAug 22, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@Akiler520

[8]ページ先頭

©2009-2025 Movatter.jp