[SERVER-32720] Field xxx of text index contains an array in document Created: 16/Jan/18 Updated: 22/Feb/18 Resolved: 17/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 3.6.0, 3.6.1, 3.6.2 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Phillip Wirth | Assignee: | Mark Agarunov |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Hi, why can't text indexes not contain an array anymore? Document:
Indexcreation
It was at least possible with 3.4.x |
| Comments |
| Comment by Phillip Wirth [ 23/Jan/18 ] |
|
@David Storch as noted before a changelog hint would be nice, thanks for the the link in the documentation by btw |
| Comment by David Storch [ 22/Jan/18 ] |
|
Hi pwirth, My apologies that you ran into this issue. We do document that the non-text fields of a text index cannot be multikey here: https://docs.mongodb.com/manual/core/index-text/#compound-index
Is there anything that we could do to clarify this point in the documentation? Best, |
| Comment by Ramon Fernandez Marina [ 20/Jan/18 ] |
|
Hi pwirth, sorry to hear you run into this issue. Unfortunately, at the moment we're not able to label any fixes to existing bugs or undefined behaviors as "breaking changes", and that's why you don't see them in the release notes on in the changelog. However our bug tracking system is public, which allows anyone to find and track any such fixes or changes that might impact them. We'll revisit this issue to see if we can do a better job at flagging any tickets that may change previously buggy / undefined behavior that users may have been relying on. Regards, |
| Comment by Phillip Wirth [ 18/Jan/18 ] |
|
@Mark Agarunov well than please note it in the changelogs as well as in the documentation regarding text indexes since this is a breaking change. |
| Comment by Mark Agarunov [ 17/Jan/18 ] |
|
Hello pwirth, Thank you for the additional information. My apologies, I initially misunderstood the request. After looking into this and reproducing the behavior you've described, I believe this was due to the change made in Thanks, |
| Comment by Phillip Wirth [ 17/Jan/18 ] |
|
@Mark Agarunov I do not want to use it as text index, it is part of a compound index. It is not mentioned in the changelogs either that this behavior has been changed! |
| Comment by Mark Agarunov [ 16/Jan/18 ] |
|
Hello pwirth, Thank you for the report. In the createIndex command in your example, the AllUnitIds field is not defined as a text index. To use this field as a text index, you would need to change AllUnitIds: 1 to AllUnitIds: "text" in the createIndex statement which should allow the field to contain arrays. Thanks, |
| Comment by Phillip Wirth [ 16/Jan/18 ] |
|
https://docs.mongodb.com/manual/core/index-text/index.html
|