Tuesday, 15 June 2010

elasticsearch - Getting search result from elastic4s in scala -


I have the following code and I am trying to get all hits from elasticsearch. If I try to write without the query part, then I get only 10 results when I call .getHits

  val resultFuture = client.execute {search / query in "query / report output" {termQuery ("MainReportID", reportId.toString)}} .ait  

Another issue is that the query part does not really work and I do not get anything. Here is a composition of my elastic search: "Hit": {"Total": 266, "Max_core": 1, "Hit": [{"_index": "Report", "_type": "Report Optup", "_id" "Cooper Clubman", "DayInstock": "10", "Stock Number": "AUWJBAuKTetnUx12_a97", "_source": {"displayName": "Classic BMW / Mini", "Model" "Q432A", "Mile": "81093", "interior colorful": "black", "year": "200 9", "trim level": "", "main riverport": "4d9e4fd3- 7fdf-41c8-8c29-45c5acaf78b1 "," Model ":" "," External "," External "," External Color ":" Pepper White "," Win ":" WMWML33509TX35944 "," Make ":" Mini " "T "K2E1"}}, ":" A "," External code code ":" 850 "," interior collar ":" gray / carbon black "," interior caller code " / Div>

You can return a number of results by setting limits on it, for example:

  Search in the "index" range 100  

But the default limit of 10 is not set by elastic4s, but by this you can not change it and return all results by default .


No comments:

Post a Comment