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 or searches on the browse documents page. 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.
Fielded Search
Search based on specific metadata fields for documents. Note that field names are lower case.
title:stone
(Demo): Searches for the word “stone” in the title of the document.title:(stone !artifacts)
(Demo): Searches for the word “stone” in the title where the word “artifacts” is NOT present.author:Adams
(Demo): Searches for the primary author Adams.author:Adams NOT Barbara
(Demo): Searches for the author Adams, but not Barbara.
Phrase Searches
Wildcards
Proximity matching
Fuzzy searching
Boosting a search term
Note: boosting works best when sorting by Relevance
Matrilineal^5 kinship
(Demo): This search boosts the relevance of the word matrilineal.author:"author:"MacNeish, Richard S."^2 OR authors:"MacNeish, Richard S."
(Demo): This search looks in the author field and additional authors field. However, the results prefer MacNeish, Richard S. as the primary author.
Searching for HRAF’s subject terms (OCMs)
ocm_ids:"342"
(Demo): 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.subjects:"age stratification"
(Demo): Searches for the Outline of Cultural Materials term “Age Stratification”. Note this is surrounded in quotes to match a phrase.
Range search
Caution
TO must be upper case.
pubdate:[2005 TO 2010]
(Demo): Searches documents published from 2005 to 2010
Boolean searches
Caution
AND, OR, and NOT must be uppercase.