Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.2
    • Component/s: Indexing, Querying
    • Labels:
      None
    • Backport:
      No
    • Backward Breaking:
      No
    • # Replies:
      124
    • Last comment by Customer:
      false
    • Documentation changes needed?:
      Done

      Description

      Simple text indexing.
      Initial version will be marked as experimental, so has to be turned on with a command line flag or at runtime.

      db.adminCommand( { setParameter : "*", textSearchEnabled : true } );
      

      OR

      ./mongod --setParameter textSearchEnabled=true
      

      Only works via "text" command currently.

      Features:

      • parsing + stemming for latin languages
      • multi-word scoring
      • phrase matching
      • word negation
      • weights per field
      • additional suffix index fields for coverings
      • additional prefix index fields for partitioning
      • specify language per document

      Simple Example:

      > db.foo.insert( { _id: 1 , desc: "the dog is running" } )
      > db.foo.insert( { _id: 2 , desc: "the cat is walking" } )
      > db.foo.ensureIndex( { "desc": "text" } )
      > db.foo.runCommand( "text", { search : "walk" } )
      {
      	"queryDebugString" : "walk||||||",
      	"language" : "english",
      	"results" : [
      		{
      			"score" : 0.75,
      			"obj" : {
      				"_id" : 2,
      				"desc" : "the cat is walking"
      			}
      		}
      	],
      	"stats" : {
      		"nscanned" : 1,
      		"nscannedObjects" : 0,
      		"n" : 1,
      		"timeMicros" : 330
      	},
      	"ok" : 1
      }
      

        Issue Links

          Activity

          Hide
          Alain Cordier
          added a comment - - edited

          I think the french stop word list is also not as accurate as it can (contains some nouns and a lot are missing).
          You can find a good one (at least for french, but I suppose some others...) here

          Show
          Alain Cordier
          added a comment - - edited I think the french stop word list is also not as accurate as it can (contains some nouns and a lot are missing). You can find a good one (at least for french, but I suppose some others...) here
          Hide
          Bojan Kostadinovic
          added a comment -

          Eliot is there an option to do full text search but sort per field instead of score?

          Show
          Bojan Kostadinovic
          added a comment - Eliot is there an option to do full text search but sort per field instead of score?
          Hide
          Jason Rassi
          added a comment -
          Show
          Jason Rassi
          added a comment - Bojan Kostadinovic : yes, see SERVER-9392 .
          Hide
          Bojan Kostadinovic
          added a comment -

          Ok in other words "No, but hopefully coming with version 2.5" since that one is Unresolved

          Show
          Bojan Kostadinovic
          added a comment - Ok in other words "No, but hopefully coming with version 2.5" since that one is Unresolved
          Hide
          Jason Rassi
          added a comment -

          Correct, that's the in-development syntax Eliot was referring to in his comment "yes, likely to be in 2.6".

          Show
          Jason Rassi
          added a comment - Correct, that's the in-development syntax Eliot was referring to in his comment "yes, likely to be in 2.6".

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              50 weeks, 1 day ago
              Date of 1st Reply: