@@ -77,9 +77,8 @@ public function newCollection(array $models = array())
7777 */
7878 public function getIndexName ()
7979 {
80- // The first thing we check is if there
81- // is an elasticquery config file and if there is a
82- // default index.
80+ // The first thing we check is if there is an elasticquent
81+ // config file and if there is a default index.
8382 $ index_name = $ this ->getElasticConfig ('default_index ' );
8483
8584 if (!empty ($ index_name )) {
@@ -111,17 +110,19 @@ public function usesTimestampsInIndex()
111110 /**
112111 * Use Timestamps In Index.
113112 */
114- public function useTimestampsInIndex ()
113+ public function useTimestampsInIndex ($ shouldUse = true )
115114 {
116- $ this ->usesTimestampsInIndex = true ;
115+ $ this ->usesTimestampsInIndex = $ shouldUse ;
117116 }
118117
119118 /**
120119 * Don't Use Timestamps In Index.
120+ *
121+ * @deprecated
121122 */
122123 public function dontUseTimestampsInIndex ()
123124 {
124- $ this ->usesTimestampsInIndex = false ;
125+ $ this ->useTimestampsInIndex ( false ) ;
125126 }
126127
127128 /**
@@ -267,7 +268,7 @@ public static function searchByQuery($query = null, $aggregations = null, $sourc
267268 *
268269 * Using this method, a custom query can be sent to Elasticsearch.
269270 *
270- * @param $params
271+ * @param $params parameters to be passed directly to Elasticsearch
271272 * @return ElasticquentResultCollection
272273 */
273274 public static function complexSearch ($ params )
@@ -410,8 +411,8 @@ public function getBasicEsParams($getIdIfPossible = true, $getSourceIfPossible =
410411 /**
411412 * Build the 'fields' parameter depending on given options.
412413 *
413- * @param bool $getSourceIfPossible
414- * @param bool $getTimestampIfPossible
414+ * @param bool $getSourceIfPossible
415+ * @param bool $getTimestampIfPossible
415416 * @return array
416417 */
417418 private function buildFieldsParameter ($ getSourceIfPossible , $ getTimestampIfPossible )
@@ -602,7 +603,7 @@ public function newFromHitBuilder($hit = array())
602603 }
603604 }
604605
605- $ instance ->setRawAttributes ((array ) $ attributes , true );
606+ $ instance ->setRawAttributes ((array )$ attributes , true );
606607
607608 // In addition to setting the attributes
608609 // from the index, we will set the score as well.
0 commit comments