Help CenterBack to Table of Contents
Search Engine Powered by MongoDB
MongoDB is a NoSQL database in favor of JSON-like documents with dynamic schemas, on which we build our search engine. To get some prerequisite knowledge, please read the offical tutorial on query documents first. We will expalin the syntax in our examples:
Expression | Explaination |
---|---|
categories.0: quant-ph |
Matches eprints whose primary category is quant-ph . |
tags: lecture notes |
Matches eprints in which the tags field has an element lecture notes . |
publication.publisher: Hindawi |
Matches eprints published on a journal with the publisher Hindawi . |
If you have learnt how to construct the query criteria, you can enter a JSON in our universal search interface to uncover more features.
Query operators
You can use almost all the query operators that MongoDB supports. Please note that the operator should be set using the bracket notation. The following provides some examples:
Expression | Explaination |
---|---|
note.pages[$gte]: 100 |
The note.pages field value is greater than or equal to 100 . |
tags[$nin]: manual, textbook |
The tags field holds an array with no elements matching manual or textbook . |
$or[journal]: null $or[doi]: null |
The journal field value is null or the doi field value is null . |
categories[$size]: 5 |
The categories field is an array with 5 elements. |
$where: "this.title.length < 20" |
Matches eprints that satisfy the JavaScript expression. |
Full-text search
Full-text search ignores stop words such as the
, and
, is
, etc., and matches on the complete stemmed word. The $text
operator performs a text search on the content of the indexed fields. It treats most punctuation in the string as delimiters, except a hyphen that negates term or a double quotes that specifies a phrase.
We have indexed all fields with string content. The text search returns results sorted in terms of the results’ score, which is calculated based on their relevance and the weights of indexed fileds.