NHMDenmark / Mass-Digitizer

Common repo for the DaSSCo team
Apache License 2.0
1 stars 0 forks source link

Novel taxon name added to digi app cannot be searched #487

Closed FedorSteeman closed 4 months ago

FedorSteeman commented 4 months ago

Whenever a digitiser writes down a novel taxon name it is added to the taxon name as well as the virtual fts index table. However, for some reason searching the fts table fails when including filters on institution id and collection id. When these are included then the matching comes up empty, but only for those newly added entries.

This is a very strange peculiarity of FTS that evades explanation. It would seem like the virtual table needs re-indexing, but I haven't found any options or commands for that.

FedorSteeman commented 4 months ago

Fixed it as apparently you cannot mix operands when searching the virtual table; You should always use MATCH:

SELECT * FROM taxonname_fts WHERE fullname MATCH 'Testus*' AND taxontreedefid MATCH 13 AND institutionid MATCH 1