Venez en apprendre davantage sur notre nouvel opérateur de recherche en texte intégral pour MongoDB Atlas. Il s'agit d'une amélioration significative des fonctionnalités de recherches de MongoDB et c'est également la solution de recherche en texte intégral la plus simple et la plus puissante pour les bases de données MongoDB Atlas.
Cette présentation est importante pour quiconque a mis en place ou en visage de mettre en place une fonctionnalité de recherche dans son application MongoDB.
Vous assisterez à une démo de $searchBeta, apprendrez comment cela fonctionne, découvrirez des fonctionnalités spécifiques vous permettant d'obtenir des résultats de recherche pertinents et apprendrez comment vous pouvez commencer à utiliser la recherche en texte intégral dans votre application dès aujourd'hui.
2. #MDBLocal#MDBLocal
Safe Harbor Statement
This presentation contains “forward-looking statements” within the meaning of Section 27A of the Securities Act of
1933, as amended, and Section 21E of the Securities Exchange Act of 1934, as amended. Such forward-looking
statements are subject to a number of risks, uncertainties, assumptions and other factors that could cause actual
results and the timing of certain events to differ materially from future results expressed or implied by the
forward-looking statements. Factors that could cause or contribute to such differences include, but are not limited
to, those identified our filings with the Securities and Exchange Commission. You should not rely upon forward-
looking statements as predictions of future events. Furthermore, such forward-looking statements speak only as
of the date of this presentation.
In particular, the development, release, and timing of any features or functionality described for MongoDB
products remains at MongoDB’s sole discretion. This information is merely intended to outline our general product
direction and it should not be relied on in making a purchasing decision nor is this a commitment, promise or legal
obligation to deliver any material, code, or functionality. Except as required by law, we undertake no obligation to
update any forward-looking statements to reflect events or circumstances after the date of such statements.
22. $searchBeta Results
{ title : { “The Mortal Instruments: City of Bones”,
fullplot : “Set in contemporary New York City, a seemingly ..”
score : 6.8801455497,
highlight: [ ]
}
23. texts.value
texts.type
$searchBeta Results
{ title : { “The Mortal Instruments: City of Bones”,
fullplot : “Set in contemporary ]New York City, a seemingly …”
score : 6.8801455497,
highlight: [ {
path: ‘fullplot’,
texts: [ { value: “After the disappearance of her …”,
type: ‘text’ },
{ value: ‘vampires’,
type: ‘hit’ },
{ value: ‘werewolves’,
type: ‘hit’ },
… } ],
score: 3.556248
} ] }
]
39. #MDBLocal#MDBLocal
Inverted Index
{ _id: 1,
S: “The quick brown fox jumped over the lazy dog” }
{ _id: 2,
S: “Quick brown foxes leap over lazy dogs in summer” }
TERM DOC
The 1
Quick 2
brown 1, 2
fox 1
foxes 2
jumped 1
leap 2
TERM DOC
the 1
quick 1, 2
brown 1, 2
fox 1, 2
in 2
jump 1, 2
dog 1, 2
STEMMING, SYNONYMS
STANDARDANALYZER
SIMPLEANALYZER
40. #MDBLocal#MDBLocal
Analyzers used in Index Definitions
Specialized Text Processors
Language specific
Specified in Index Creation
Text -> Terms -> Lucene
47. compound: {
"must" : {},
"mustNot": {},
"filter" : {},
"should": []
}
compound: operator – complex recursive queries
Must Match (scored)
Must not match(not scored)
Must match(not scored)
Should match(scored)
Operators can be other operator: term, span, search,
queryString, exists, or even another compound
50. #MDBLocal#MDBLocal
MongoDB +
• Pre-existing functionality
• Highlights, fuzzy-matching, query-time scoring,
faceted searches and more
• Analyzers
• Language support
• Western languages: English, French, etc.
• Eastern Languages: CJK, bigram/unigram support
• Inverted index structure = fast searches
51. #MDBLocal#MDBLocal
MongoDB Atlas FTS components
mongod mongos mongot (NEW!)
● $searchBeta aggregation
pipeline stage
● Talks mongodb wire protocol to
mongot
● Shard aware implementation
● scatter-gather queries
● Based on Apache Lucene 8
● Integrated into MongoDB Atlas
● Separate java process from
mongod
● collocated with mongod
53. #MDBLocal#MDBLocal
FTS Indexing: Steady State
Documents
mongotmongod
changestream
MongoDB Atlas
(per node)
mongot watches
the changestream
continuously and
updates the
search index
55. Key Takeaways
Ø Apache Lucene 8
Ø Uses MongoDB Query Language
Ø Wide variety of query operators – fuzzy, wildcard
Ø Flexible Scoring and Highlights
Ø Configurable Indexes
56. #MDBLocal#MDBLocal
Ø Free Tier
Ø Expanded Data Type Support
ü Dates
ü Numbers
Ø Synonyms
Ø Improved Operators / Syntax
Ø Performance Improvements
What’s Next? 2020 Roadmap
GA at MongoDB World, May 4-6