I have a query re the operation of the tntsearch:import command where it does not seem to be indexing my models correctly,
I have a published key on my model I only want models indexed if published is set.
When I update the model or run scout:import they are indexed correctly but when I run tntsearch:import models are indexed regardless of published
Or is this the correct operation of tntsearch:import
Below is my toSearchableArray
public function toSearchableArray()
{
// only add to search index if story is published and approved
if ($this->published) {
$array = $this->toArray();
}else{
$this->unsearchable();
$array = [];
}
return $array;
}
I have a query re the operation of the
tntsearch:import
command where it does not seem to be indexing my models correctly,I have a published key on my model I only want models indexed if published is set.
When I update the model or run
scout:import
they are indexed correctly but when I runtntsearch:import
models are indexed regardless of publishedOr is this the correct operation of
tntsearch:import
Below is my toSearchableArray