PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, October 25, 2022

[FIXED] How to set track_total_hits in Elasticsearch using Laravel Scout?

 October 25, 2022     elasticsearch, laravel, laravel-scout     No comments   

Issue

I have been using https://github.com/babenkoivan/scout-elasticsearch-driver and I am looking to set "track_total_hits" to true so I can get the total results.

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html#request-body-search-track-total-hits

I am not sure how to get an array value to that point?

Thanks.


Solution

The package you are using is not implementing the track_total_hits (a search on the repo content will confirm that). You can, however, fork the repo and add the functionality yourself if required.



Answered By - Christophe Hubert
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing