Search guide

This guide explains how to perform advanced search queries on himaldoc using easy to understand examples.

Simple search (presence of both terms)

Example: mountain environment

Results will match records with the presence of both terms mountain and environment in any field. Note that stemming is applied so e.g. environment will also match environments. Search results are ranked according to an algorithm that takes your query terms into account.

You can require presence of any terms using OR operator:

Examples: mountain OR environment

You can require absence of one or more terms using either the - or NOT operator:

Examples: -mountain +environment or NOT mountain AND environment

Phrase search

Example: "mountain environment"

Results will match records with the phrase mountain environment in any field.

Field search

Example: title:mountain

Results will match records with the term mountain in the field title. If you want to search for multiple terms in the title you must group the terms using parenthesis:

Example: title:(mountain environment)

See the field reference below for the full list of fields you can search.

Combined simple, phrase or field search

Example: +title:"mountain environment" -title:policy or e.g. title:(-mountain +environment)

You can combine simple, phrase and field search to construct advanced search queries.

Range search

Example: publisher_year:[2017 TO 2018] (note, you must capitalize TO).

Results will match any record with a publication date between 2017-01-01 and 2018-01-01 (both dates inclusive).

Note that, partial dates are expanded to full dates, e.g.:

  • 2017 is expanded to 2017-01-01
  • 2017-06 is expanded to 2017-06-01

Use square brackets ([]) for inclusive ranges and use curly brackets ({}) for exclusive ranges, e.g.:

  • [2017 TO 2018} is equivalent to [2017-01-01 TO 2017-12-31] because of date expansion and exclusive upper bound.

Examples of other ranges:

  • publication_date:{* TO 2017-01-01}: All days until 2017.
  • publication_date:[2017-01-01 TO *]: All days from 2017.
  • size:[1000000 TO *]: File size bigger than 1MB.
  • size:>1000000: File size bigger than 1MB.
  • size:>=1000000: File size bigger than or equal to 1MB.

Ranking/Sorting

By default all searches are sorted according to an internal ranking algorithm that scores each match against your query. In both the user interface and REST API, it's possible to sort the results by:

  • Most recent
  • Publication date
  • Title
  • Conference session
  • Journal
  • Version

Regular expressions

Regular expressions are a powerful pattern matching language that allow to search for specific patterns in a field. For instance if we wanted to find all records with a DOI-prefix 10.5281 we could use a regular expression search:

Example: doi:/10\.5281\/.+/

Careful, the regular expression must match the entire field value. See the regular expression syntax for further details.

Missing values

It is possible to search for records that either are missing a value or have a value in a specific field using the _exists_ and _missing_ field names.

Example: _missing_:notes (all records without notes)

Example: _exists_:notes (all records with notes)

Advanced concepts

Boosting

You can use the boost operator ^ when one term is more relevant than another. For instance, you can search for all records with the phrase mountain environment in either title or description field, but rank records with the phrase in the title field higher:

Example: title:"mountain environment"^5 description:"mountain environment"

Fuzziness

You can search for terms similar to but not exactly like your search term using the fuzzy operator ~.

Example: mountian~

Results will match records with terms similar to mountian which would e.g. also match mountain.

Proximity searches

A phrase search like "mountain environment" by default expect all terms in exactly the same order, and thus for instance would not match a record containing the phrase "mountain access and environment". A proximity search allows that the terms are not in the exact order and may include other terms inbetween. The degree of flexiblity is specified by an integer afterwards:

Example: "mountain environment"~5

Wildcards

You can use wildcards in search terms to replace a single character (using ? operator) or zero or more characters (using * operator).

Example: mountai? environme*

Wildcard searches can be slow and should normally be avoided if possible.


Powered by Invenio