Coder Social home page Coder Social logo

Highlighting about elasticquent HOT 5 OPEN

razor2611 avatar razor2611 commented on September 15, 2024
Highlighting

from elasticquent.

Comments (5)

modernmediaca avatar modernmediaca commented on September 15, 2024

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.

from elasticquent.

modernmediaca avatar modernmediaca commented on September 15, 2024

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.

from elasticquent.

modernmediaca avatar modernmediaca commented on September 15, 2024

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.

from elasticquent.

timgws avatar timgws commented on September 15, 2024

@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).

from elasticquent.

timgws avatar timgws commented on September 15, 2024

@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.

from elasticquent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.