Search Syntax

Searching in eHRAF is built with Apache Solr. This page covers several example search queries you can use with regular searches for paragraphs. Note that Advanced Searches perform some of this functionality using an interface, and it isn’t possible to use this syntax in an Advanced Search form.

Consult Solr documentation for even more extensive ways to construct search queries.

Phrase Searches

  1. "environmental unpredictability" Searches have to match the phrase environmental unpredictability.

  2. hypothesis:"environmental unpredictability" Searches have to match the phrase environmental unpredictability in the hypothesis field.


  1. Hunt* Searches for all words that start with hunt such as hunting, hunter, etc.

  2. Game? Searches for all words that have any one character after the word. Would match Game, Games, or Gamey

Proximity matching

  1. "unilocal unilineal"~5 Finds occurrences where unilocal and unilineal appear within five words of each other.

  2. "division labor"~3 Finds occurrences where division and labor are within 3 words of each other.

Fuzzy searching

  1. Monroe~ Searches for words based on the Levenshtein distance. Therefore, this search might find Munroe, the correct spelling, as it is of similar spelling.

  2. culture~.2 Specifies a required similarity between 0 and 1. The default is .5.

Boosting a search term

Note: boosting works best when sorting by Relevance

  1. Matrilineal^5 kinship This search boosts the relevance of the word matrilineal.

  2. author:"Bacon, Margaret K."^2 OR additional_authors:"Bacon, Margaret K." This search looks in the author field and additional authors field. However, the results prefer Barry III, Herbert as the primary author.

Searching for HRAF’s subject terms (OCMs)

  1. ocm:342 This search looks for the subject category from the Outline of Cultural Materials “Dwellings” which has the identifier 342 as a shorthand. Variables are tagged with OCMs.

  2. ocm_terms:"puberty and initiation" Searches for the Outline of Cultural Materials term Puberty and Initiation. Note this is surrounded in quotes to match a phrase.

Boolean searches


AND, OR, and NOT must be uppercase.

  1. ocms:342 OR dwelling* Searches for the OCM 342 or the word dwelling or dwellings.

  2. ("division labor"~3) AND residence Combines proximity match search with the word search for residence.