mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Use "WITH PARSER" clause for fulltext index definition #5755
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kissge on GitHub (Nov 1, 2017).
Originally assigned to: @Ocramius on GitHub.
Is it possible to use WITH PARSER on index definition? e.g.
CREATE FULLTEXT INDEX body_idx ON article (body) WITH PARSER mecab;cf. https://stackoverflow.com/questions/46812438/doctrine-use-with-parser-clause-for-fulltext-index-definition
@Ocramius commented on GitHub (Nov 1, 2017):
You'd do that in an SQL migration rather than via ORM mappings, in my
opinion.
On 1 Nov 2017 05:34, "kissge" notifications@github.com wrote:
@kissge commented on GitHub (Nov 2, 2017):
Hmm. So, in projects using WITH PARSER fulltext index, basically
doctrine:schema:createwould be meaningless. I'd like some cleverer ideas :)@Ocramius commented on GitHub (Nov 2, 2017):
I think "cleverer" is pretty much the keyword. Not everything should be
funneled through the schema tools. For instance, I have triggers, stored
procedures, index and view definitions that are not representable in ORM
mapping definitions.
If you go down the "represent all possible DDL in the ORM" route, it is a
never ending rabbit hole.
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
On Thu, Nov 2, 2017 at 7:27 AM, kissge notifications@github.com wrote:
@kissge commented on GitHub (Nov 3, 2017):
Thanks Marco... I understand what you mean.
If anyone knows any "hack" to this problem, I'd appreciate it.
@lcobucci commented on GitHub (Nov 26, 2017):
I'll close this issue since it has been answered by @Ocramius. Please re-open it if you feel the need of discussing it further.
@zjsxwc commented on GitHub (Jul 24, 2018):
i have the same problem. And i tried the migration way, but every time after i run
update --forcethe database index is revert back to the index which*WITHOUT* PARSER ngram.so my solution is to write a new Driver(which extends the default driver \Doctrine\DBAL\Driver\PDOMySql\Driver) that is configured in symfony file
app/config/config.ymlto replace the default driver.my new driver
my new MySQL57FixPlatform
And finally in my Entity file add the
withoptions: