teamtnt / tntsearch

A fully featured full text search engine written in PHP
https://tnt.studio/solving-the-search-problem-with-laravel-and-tntsearch
MIT License
3.08k stars 292 forks source link

Update a geosearch index #276

Open romlob opened 1 year ago

romlob commented 1 year ago

how to update a geosearch index ? I try to use the same method for the simple index but it return me "SQLSTATE[HY000]: General error: 1 no such table: wordlist" I have no idea to solve this .

piolet commented 1 year ago

I think we need to implement, in the TNTGeoIndexer, its own insert and delete methods. Currently, since it inherits from TNTIndexer, these 2 methods do as if they were in a classical indexer, so they manipulate your tables that don't exist

For example, the insert method could be like this : public function insert($document) { $this->processDocument(new Collection($document)); } to avoid the process linked to table total_documents . In the same way, the delete method should juste delete row for table locations