-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Text Search
-
Query Integration
Support subdocuments with various relevance or scores based on the text match weight of those sub-documents.
Example Schema:
{ name: 'Bob Jones, Lord of Waking', favorites: [{title:'The Kraken Wakes'}, {title:'Lord of Light'}] } db.users.ensureIndex({name:'text', 'favorites.title':'text'}); db.users.runCommand('text', {search:'lord'});
Results would include a 'score' value of the entire document and a 'score object' that includes the scores in-place for each sub-document.
Example 'scores' object:
"score" : 0.75, "scores" : {_:.75,favorites:[{_:0}, {_:0.88}]