Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting #19

Open
razor2611 opened this issue Feb 12, 2015 · 5 comments
Open

Highlighting #19

razor2611 opened this issue Feb 12, 2015 · 5 comments

Comments

@razor2611
Copy link

Any example on how we can use highlighting?

@modernmediaca
Copy link

I am also looking for this I tried to add it in myself but I'm thinking the low level php library might not support it or something. Still investigating will let you know what I find out.

@modernmediaca
Copy link

Was able to get it working by modifying the searchByQuery function. I am going to generalize it a bit and then I will put up a pull request.

@modernmediaca
Copy link

I really don't like the way the parameters work in the searchByQuery function. $query, $aggs, $sort and $sourceFields could all be condensed into one parameter $body. That would allow for much more flexibility without having a million parameters. Then you could do stuff like highlighting without having to add another parameter to support it. If you wanted to be able to still separate things out, you could have setter functions (setQuery, setAggregations, setHighlight, setFields, setSort) that build out the one parameter you pass into searchByQuery. When I get some time I am going to go ahead and do this on my fork if anyone is interested. I need highlighting support but I don't want to add yet another parameter.

@timgws
Copy link

timgws commented Jul 1, 2015

@modernmediaca, I agree. Please have a look at https://github.com/elasticquent/Elasticquent, which I have forked from @adamfairholm (I already have some of your commits there in that repository).

@timgws
Copy link

timgws commented Jul 1, 2015

@razor2611 have you seen the documentation? https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-highlighting.html

You will need to change your query function a little to make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants