Repository navigation
Conversation
|
builds upon #35 , will rebased once that one is merged |
This reverts commit b172e64.
|
@dblock here we keep failing miserably on Mongoid 3 (but not 3.1). No idea why, again … |
|
I can reproduce this locally and it looks like a clear bug introduced in this PR. We could drop support for 3.0, but I'd like to understand what's going on. With Mongoid 3. Both I am supposed to get back 2 objects, an external artist and artwork via In Mongoid 3 the query is The code in |
|
I tried |
|
This is simpler and works for all versions: return {} if descendants.none? |
|
@tomasc Got a moment to wrap this up? |
|
@dblock will try to get to that this week. In the end I ended up not using the gem, but yes, let's wrap this up. |
Adapt the SCI and criteria proposal from @tomasc in mongoid#37; preserve shared-index searches and apply limits after excluding missing/scoped-out documents. Co-authored-by: Tomas Celizna <tomas.celizna@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adapt the SCI and criteria proposal from @tomasc in mongoid#37; preserve shared-index searches and apply limits after excluding missing/scoped-out documents. Co-authored-by: Tomas Celizna <tomas.celizna@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
AI posting on behalf of @dblock: adapted this proposal onto the modernized code in #57, with @tomasc credited in the changelog, PR description, and commit coauthor. The replacement adds regression coverage for result limits after filtering, dangling references with strict Mongoid settings, scores, descendants, and unscoped/shared-index compatibility, including Mongoid 3.0. Its complete fork matrix is green: https://github.com/dblock/mongoid_fulltext/actions/runs/38996842235. Closing this older PR in favor of #57; thank you for the original implementation. |
Adapt the SCI and criteria proposal from @tomasc in mongoid#37; preserve shared-index searches and apply limits after excluding missing/scoped-out documents. Co-authored-by: Tomas Celizna <tomas.celizna@gmail.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The search now respects SCI.
From the included spec:
It is also possible to pre-empt the search with Monogid criteria:
Please note that this will obviously not work in case an index is shared by multiple classes (that are not connected through inheritance), since a criteria applies only to one class.