* fix pruning empty tokens from search
* convert search into separate endpoints * move shared functionalty to components * NOTE: acceptance of opensearch has waned over the last decade and the script should be updated