php - Text command will be removed > should use $text query instead -
i've set mongodb lastly release of every components:
mongodb 2.6.2 php 5.5.11 vc11 php_mongo.dll (i'm on windows) 1.4.3 ts vc11i made quick test check if db ok , can retrieve info using total text search:
$m = new mongoclient(); $db = $m->mytestdb; $result = $db->command( array( 'text' => 'items', 'search' => 'something', 'limit' => 50, ) ); everything ok when see mongodb logs there 1 unusual message can't find answers on web:
[conn1] text command removed in future release. utilize $text query operator instead.
as i'm starting work on it's kinda freaking me know total text search i'm using deprecated.
even official doc using code (see illustration #4).
so should utilize instead of code? i'm afraid if utilize code someday during apt-get update & upgrade code drop down.
i found out new $text 2.6, here how same request before command:
$m = new mongoclient(); $db = $m->mytestdb; $collection = $db->items; $cursor = $collection->find( array( '$text' => array('$search' => 'something search') ), array ( 'score' => array('$meta' => "textscore") ) ); php mongodb full-text-search deprecated
No comments:
Post a Comment