Word Searching on Geograph
Published: 10 October 2008
Contents
Main Features
- Enter multiple keywords separated by spaces, in any order (all required, AND is the default)
- Not case sensitive
- Matches whole words only
- Punctuation is not searchable (all characters other than letters, numbers and underscores)
- Uses stemming, so bridge matches bridges, bridging etc (can be disabled on a per word basis, see below)
- Can match phrases ("road bridge")
- Supports OR keyword (bridge OR bont OR pont) Can also use | as the short form of OR
- Can exclude words/terms (canal -river or river -"road bridge")
- Extensive query syntax, for more advanced queries, see below
Currently searches
Entered keywords can match any of the following fields in the image metadata:- title, description, shared description(s) and photographer name
- category, geographical context(s), and tag(s)
- image taken date (20071103, 200711 or just 2007) fields
can also use the monthname, which will match any year, eg April
- subject grid-reference (SH1234, SH13 or just SH)
Field Searches
By default keywords match all fields (see above), but can optionally choose to restrict matches to specific fields.Entering a field name, followed by a colon, makes all keywords after that point (or until another field name and colon), only match against that named field. (the field name is case sensitive, and must be lowercase)
NOTE: The Browser now uses a different search index, which has a different (but largely similar) set of Fields, Noted here.
(Note: it is recommended to put fields at the end of the query - i.e. normal keywords should be first)
title:arch bridge
description:road diversion
category:road
tags:bridge (search just in the tags)
text:oast house ('text' is a special case, and matches the title, description, category and tags - not the shared description(s))
year:2007 (the year the photo was taken)
month:200605 (the year-month, eg May 2006)
monthname:April (just the month, allows searching in any year)
day:20060521 (the day, eg 21st May 2006)
myriad:SH
myriad:H (of course works for single letter Irish Myriads too)
hectad:TQ49
hectad:(TQ49|TQ59|TQ69) (list of possible hectads)
gridref:TQ4192
category:"^Motte and bailey$" (exact category match)
name:"Fred Smith" (finds the words in the Photographer name)
notname:mcdonald (excludes Photographer name)
user_id:77 (find images contributed by that specific user)
status:geograph (just Geograph images, also status:supplemental)
ftf:1 (just Geograph (First) images)
ftf:2 (just Geograph (Second) images)
ftf:3 (just Geograph (Third) images)
ftf:4 (just Geograph (Fourth) images)
points:tpoint (just TPoint winning images)
snippet:oast house (looks for words in shared description attached to the image)
snippet_title:oast house (looks for words in shared description title attached to the image)
snippet_id:17 (looks for images with that specific shared description)
tags:church Search for the word church just in the tags attached to an image.
note, if wanting to search by tag prefix, don't enter the : within the tag, eg to search the tag [ river:Arthog ], you need to enter tags: "river Arthog"
Other features
- Prefix a keyword with = to match exactly.
This disables stemming for that keyword (otherwise bridge matches bridges, bridging etc) (road =bridge).
Only applies to the single keyword, or a phrase eg.one ="two three" (ie two and three are not stemmed).
- Start whole query with ~ to match ANY keywords, as opposed to all/AND. (~bridge road river)
Can now be used with phrases ~"=beech wood" "=beech tree"
Note: can't be used with many features, in particular brackets, field searches, OR and negations (-).
- Quorum: "the world is a wonderful place"/3 The example will match all images that have at least 3 of the 6 specified words.
- Hyphenated words are a special case, fox-hole will match fox-hole, "fox hole" and foxhole! So this is the recommended way to search for placenames where you don't know if it's hyphenated or not - if in doubt hyphenate!
Also works with single ', eg st mary's.
- Field Start/End modifiers. Can prefix a keyword with ^ to anchor it to be beginning. Eg ^bridge only match if bridge is the first word in the title, description etc. Combine with fields specifier, eg category:^road. Also $ is used as field end, eg street$ only matches title etc, ends with street. Can be combined, and particularly useful with phrases. Ef title:"^high street$" only matches the title as exactly high street, with no other words.
- The characters ~ | ( ) @ " / ' = < ^ $ , - : are all part of the query syntax and have special meanings, all other characters except a-z, 0-9 and _ (they are the actual word characters) are stripped/ignored.
More examples
bridge -description:road=river title:bridge
"road bridge" OR "river bridge"
road bridge -"suspension bridge"
=bridge category:road
junction TQ category:"a road"
river myriad:(tq OR nt OR so)
~river afon =stream watercourse =brook
(river OR road) tree (brackets optional)
Practical tool
This tool: Link
Allows you build a keyword search query for use on geograph, by filling in boxes. It's a great way to learn the syntax, as can see it create the query as you type in the boxes.