Skip to content

Refactor - #40

Closed
tomasc wants to merge 27 commits into
mongoid:masterfrom
tomasc:refactor
Closed

tomasc wants to merge 27 commits into
mongoid:masterfrom
tomasc:refactor

Conversation

@tomasc

@tomasc tomasc commented May 6, 2018

Copy link
Copy Markdown
Contributor

@dblock I started to refactor the gem a bit (split into modules & services) so that it is easier to extend in the future, however there is still left to be improved upon.

Could you please take a look? I have hard time understanding in some cases – it would great to abstract some of the calculations in well-named methods. Thank you.

@tomasc

tomasc commented May 6, 2018

Copy link
Copy Markdown
Contributor Author

again, this builds upon #38 , will rebase once that one is merged

@dblock

dblock commented May 7, 2018

Copy link
Copy Markdown
Contributor

I welcome anything that breaks this code apart!

@dblock

dblock commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

AI posting on behalf of @dblock: revisited this during backlog maintenance. The functional proposals this builds on are being adapted separately in #57 (criteria/SCI) and #58 (localized fields), with @tomasc credited, while #51 modernizes the full Mongoid 3–9 matrix. I am keeping this refactor open rather than mixing a 25-file extraction with those behavior fixes. A follow-up should rebase on the accepted fixes and preserve the old public module/class/instance entry points and legacy Mongoid index hooks; the current refactor also changes configuration and index-hook wiring, so it is not being treated as a mechanical file move.

dblock added a commit to dblock/mongoid_fulltext that referenced this pull request Oct 17, 2026
Follow the maintainability direction proposed by @tomasc in mongoid#40 without changing model APIs, locale storage, scoring, or Mongoid driver hooks.

Co-authored-by: Tomas Celizna <tomas.celizna@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock

dblock commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

AI posting on behalf of @dblock: the remaining worthwhile maintainability work is now in #60, following @tomasc’s original extraction proposal. It separates ngram calculation/scoring and index-definition planning into independently testable helpers while retaining the existing model entry points and Mongoid driver hooks. The criteria and localized-field features previously proposed here have already landed through #57 and #58.

The narrower replacement preserves current scoring, endpoint sampling, Unicode alphabets, array fields, shared-model filters, locale-tagged storage, bulk insertion, and timeout options instead of transplanting the older implementation. @tomasc is credited in the changelog, PR description, and commit coauthor. No reindex or migration is needed. Leaving this proposal open until the replacement is merged.

dblock added a commit to dblock/mongoid_fulltext that referenced this pull request Oct 17, 2026
Follow the maintainability direction proposed by @tomasc in mongoid#40 without changing model APIs, locale storage, scoring, or Mongoid driver hooks.

Co-authored-by: Tomas Celizna <tomas.celizna@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock added a commit that referenced this pull request Oct 17, 2026
Follow the maintainability direction proposed by @tomasc in #40 without changing model APIs, locale storage, scoring, or Mongoid driver hooks.

Co-authored-by: Tomas Celizna <tomas.celizna@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock

dblock commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

AI posting on behalf of @dblock: closing this original proposal now that its focused maintainability replacement #60 has merged. The criteria and localized-field features landed earlier in #57 and #58. #60 extracts ngram calculation/scoring and index-definition planning while preserving current model APIs, search behavior and locale-tagged storage; no reindex is required. Thank you @tomasc for the original proposal, credited in the replacement changelog, description and commit coauthor.

@dblock dblock closed this Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants