Page MenuHomePhorge

Remove unused functions in PhabricatorFulltextToken
Needs ReviewPublic

Authored by aklapper on Thu, May 29, 13:07.

Details

Reviewers
None
Group Reviewers
O1: Blessed Committers
Summary

PhabricatorFulltextToken::isQueryable(), PhabricatorFulltextToken::setIsShort(), PhabricatorFulltextToken::setIsStopword()
all got introduced in rP3245e74f16bb28ae905f76fcc99d722abc8320ab not to query stopwords or short tokens.

These functions were called in https://we.phorge.it/source/phorge/browse/master/src/applications/search/fulltextstorage/PhabricatorMySQLFulltextStorageEngine.php;faca1deea5b5a21aa936032114e7e1b1ba471884.
That Storage Engine got deleted in rPda0a08a7e13e01d5e34bb0a12706a7b4f9e348d6 to move to Ferret; see https://web.archive.org/web/20250422194147/http://secure.phabricator.com/T12819.
Phorge's Elasticsearch related classes do not use such functionality either.
Thus delete these functions, assuming that no third-party StorageEngine calls them in some unknown custom code.

Test Plan

Read and grep the code.

Diff Detail

Repository
rP Phorge
Branch
unusedFulltextToken (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2023
Build 2023: arc lint + arc unit

Event Timeline

I'd love to have Phorge skip common words and short words though.
So maybe keeping these functions could even make sense so future improvements could call them?

I am just clueless if Ferret currently does / how Ferret works and I know that I am not 100% happy with Ferret's results.