File tree Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Expand file tree Collapse file tree 3 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,23 @@ public function getIndexedDocument();
115
115
*/
116
116
function getBasicEsParams ($ getIdIfPossible = true );
117
117
118
+ /**
119
+ * Is Elasticsearch Document
120
+ *
121
+ * Is the data in this module sourced
122
+ * from an Elasticsearch document source?
123
+ *
124
+ * @return bool
125
+ */
126
+ public function isDocument ();
127
+
128
+ /**
129
+ * Get Document Score
130
+ *
131
+ * @return null|float
132
+ */
133
+ public function documentScore ();
134
+
118
135
/**
119
136
* Put Mapping
120
137
*
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ public function isDocument()
160
160
}
161
161
162
162
/**
163
- * Get Score
163
+ * Get Document Score
164
164
*
165
165
* @return null|float
166
166
*/
Original file line number Diff line number Diff line change @@ -57,8 +57,6 @@ public function testMappingSetup()
57
57
58
58
/**
59
59
* Test Index Document Data
60
- *
61
- * @return void
62
60
*/
63
61
public function testIndexDocumentData ()
64
62
{
@@ -74,6 +72,17 @@ public function testIndexDocumentData()
74
72
array ('foo ' => 'bar ' ), $ custom ->getIndexDocumentData ());
75
73
}
76
74
75
+ /**
76
+ * Test Document Null States
77
+ */
78
+ public function testDocumentNullStates ()
79
+ {
80
+ $ model = $ this ->testingModel ();
81
+
82
+ $ this ->assertFalse ($ model ->isDocument ());
83
+ $ this ->assertNull ($ model ->documentScore ());
84
+ }
85
+
77
86
}
78
87
79
88
class TestModel extends Eloquent implements \Elasticquent \ElasticquentInterface {
You can’t perform that action at this time.
0 commit comments