Skip to content

Commit

Permalink
fix text partitioning with indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Dec 26, 2012
1 parent eebab54 commit 6ba39d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jstests/fts_partition1.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ assert.eq( 0, res.ok, tojson(res) );

assert.eq( [ 1 ], queryIDS( t, "foo" , { x : 1 } ) );

res = t.runCommand( "text", { search : "foo" , filter : { x : 1 } } );
assert( res.results[0].score > 0, tojson( res ) )

2 changes: 2 additions & 0 deletions src/mongo/db/fts/fts_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ namespace mongo {
BSONObj key = cursor->currKey();

BSONObjIterator i( key );
for ( unsigned j = 0; j < _fts->getFtsSpec().numExtraBefore(); j++ )
i.next();
i.next(); // move pase indexToken
BSONElement scoreElement = i.next();

Expand Down

0 comments on commit 6ba39d0

Please sign in to comment.