[COMPASS-5386] Single field Text Index being reported as "Compound" Created: 30/Dec/21  Updated: 29/Oct/23  Resolved: 25/Aug/22

Status: Closed
Project: Compass
Component/s: Compass, Indexes
Affects Version/s: 1.32.2
Fix Version/s: 1.33.1

Type: Bug Priority: Major - P3
Reporter: David Walker Assignee: Basit Chonka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Compass Version 1.29.6 (1.29.6)


Attachments: PNG File Screen Shot 2021-12-30 at 2.38.32 PM-1.png     PNG File Screen Shot 2021-12-30 at 2.38.49 PM.png    
Epic Link: COMPASS-5485
Documentation Changes: Not Needed

 Description   

Problem Statement/Rationale

When a single field text index (not compound) is displayed in Compass (Version 1.29.6 (1.29.6)), it shows as being a compound index under its properties. This seems to be due to text indexes having a key definition of key:

{ _fts: 'text', _ftsx: 1 }

Steps to Reproduce

Create a single field text index, such as db.myTest.createIndex(

{a:"text"}

). View the properties of the index in Compass, and it should show "COMPOUND".

Expected Results

It should not be displayed as a compound index. Text indexes are always sparse, so it should have a property of sparse. That's how it works in the Atlas UI.

Actual Results

It incorrectly shows the single field index as being a compound index

Additional Notes

This varying behavior has caused confusion for users when viewing an index in Compass vs Atlas. Screenshots attached for the same index when viewed in Compass and Atlas.



 Comments   
Comment by Githook User [ 28/Sep/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: update-compass-shell-to-shared-config
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Comment by Githook User [ 31/Aug/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: 1.33-releases
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Comment by Githook User [ 30/Aug/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: compass-settings
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Comment by Githook User [ 29/Aug/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: COMPASS-5971-fix-import-deep-json
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Comment by Githook User [ 26/Aug/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: connection-info-modal
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Comment by Githook User [ 25/Aug/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: COMPASS-5941-refresh-indexes
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Comment by Githook User [ 25/Aug/22 ]

Author:

{'name': 'Basit', 'email': '1305718+mabaasit@users.noreply.github.com', 'username': 'mabaasit'}

Message: fix(index-model): text index is not compound COMPASS-5386 (#3385)

Co-authored-by: Rhys <Anemy@users.noreply.github.com>
Branch: main
https://github.com/mongodb-js/compass/commit/ab383763514672fc5295c3b6d96b3b540144ca0c

Generated at Wed Feb 07 22:39:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.