Transcript
Page 1: OGC Geospatial Summit  September 15, 2008

OGC Geospatial Summit September 15, 2008

 

CQL and SRUCQL and SRU

Ray Denenberg, Library of Congress OASIS Search Web Services Technical Committee

Page 2: OGC Geospatial Summit  September 15, 2008

Brief History

Page 3: OGC Geospatial Summit  September 15, 2008

Brief History Late 90s, Pressure to make Z39.50….

Simpler, more comprehensible,more implementable

Page 4: OGC Geospatial Summit  September 15, 2008

Brief History Late 90s, Pressure to make Z39.50….

Simpler, more comprehensible,more implementable

But most important: Web Compatible

Page 5: OGC Geospatial Summit  September 15, 2008

Brief History Late 90s, Pressure to make Z39.50….

Simpler, more comprehensible,more implementable

But most important: Web Compatible …..while retaining the Z39.50

semantics and abstractions

Page 6: OGC Geospatial Summit  September 15, 2008

Roughly speaking …. SRU/CQL is the XML/Web version of Z39.50.

Page 7: OGC Geospatial Summit  September 15, 2008

Roughly speaking …. SRU/CQL is the XML/Web version of Z39.50.

Where:

SRU corresponds to the Z39.50 protocol

CQL corresponds to the Z39.50 query

Page 8: OGC Geospatial Summit  September 15, 2008

Timeline

1997-2001 A few false starts … 2001 Work on SRU began 2002 Version 1.0 2004 Version 1.1 2007 Version 1.2 In progress Version 2.0, OASIS SWS TC

Page 9: OGC Geospatial Summit  September 15, 2008

http://www.loc.gov/sru?version=1.1&operation=searchRetrieve&query=dinosaur&maximumRecords=1&recordSchema=dc

An SRU Protocol Request

Page 10: OGC Geospatial Summit  September 15, 2008

http://www.loc.gov/sru?version=1.1&operation=searchRetrieve&

query=dinosaur

&maximumRecords=1&recordSchema=dc

Server

Parameters

CQL Query

More parameters

Break it down:

Page 11: OGC Geospatial Summit  September 15, 2008

query=dinosaurCQL Query

Page 12: OGC Geospatial Summit  September 15, 2008

CQL

““Contextual Contextual Query Language”Query Language”

Page 13: OGC Geospatial Summit  September 15, 2008

CQL’s Goals

Page 14: OGC Geospatial Summit  September 15, 2008

CQL’s Goals

Support simple queries with simplicity,

Number one goal

Page 15: OGC Geospatial Summit  September 15, 2008

CQL’s Goals

Support simple queries with simplicity,

and complex expressions with exactly the complexity needed: no more, no less.

Page 16: OGC Geospatial Summit  September 15, 2008

Simple CQL Queries

Page 17: OGC Geospatial Summit  September 15, 2008

Simple CQL Queries cat (simplest)

Page 18: OGC Geospatial Summit  September 15, 2008

Simple CQL Queries cat (simplest)

cat and dog (simple boolean)

Page 19: OGC Geospatial Summit  September 15, 2008

Simple CQL Queries …… cat (simplest)

cat and dog (simple boolean)

title = cat (index search)

Page 20: OGC Geospatial Summit  September 15, 2008

….. A little more complex cat

cat and dog

title = cat

dc.title = cat (index qualified)

Page 21: OGC Geospatial Summit  September 15, 2008

Qualified index

title = cat dc.title = cat bib.title = cat

Page 22: OGC Geospatial Summit  September 15, 2008

Qualified index

title = cat dc.title = cat bib.title = cat geo.latitude = 22.6

Page 23: OGC Geospatial Summit  September 15, 2008

Qualified index

title = cat dc.title = cat bib.title = cat geo.latitude = 22.6 geo.bound encloses "45.3, 19.0"

Page 24: OGC Geospatial Summit  September 15, 2008

Relations

<index> <relation> <search term>

Page 25: OGC Geospatial Summit  September 15, 2008

<index> <relation> <search term>

Search Clause

Page 26: OGC Geospatial Summit  September 15, 2008

<index> <relation> <search term>

Search Clause

(e.g. title = cat)

Page 27: OGC Geospatial Summit  September 15, 2008

Cat

Title = cat

Both are search clauses: in the first, the index and relation are defaulted.

Page 28: OGC Geospatial Summit  September 15, 2008

cat

Same as

<default Index> <default relation> cat

Page 29: OGC Geospatial Summit  September 15, 2008

Some built-in relations … <, >, <=, >=, <> = the default relation, server defined

== Exact

adjAdjacency

Withinencloses

Page 30: OGC Geospatial Summit  September 15, 2008

Relation Modifiers

Page 31: OGC Geospatial Summit  September 15, 2008

Search Clause

<index> <relation>/<modifier> <search term>

Relation modifier

Page 32: OGC Geospatial Summit  September 15, 2008

Relation Modifiers Stem relevant Fuzzy Phonetic partial

Page 33: OGC Geospatial Summit  September 15, 2008

Relation Modifier Example

Geo.city =/phonetic washintin

Relation modifier

Page 34: OGC Geospatial Summit  September 15, 2008

Partial

geo.area encloses/partial “washington DC"

Page 35: OGC Geospatial Summit  September 15, 2008

Proximity

“Find cat and dog in the same sentence”

cat prox//sentence dog

Page 36: OGC Geospatial Summit  September 15, 2008

Proximity

cat prox//sentence dogsame as:

Cat

prox/distance=0/unit=sentence/unordered

dog

Page 37: OGC Geospatial Summit  September 15, 2008

Proximity

prox/distance=0/unit=sentence/unordered

Page 38: OGC Geospatial Summit  September 15, 2008

geo.cityname = washington 

prox/distance<=50/geo.unit=miles

geo.cityname=baltimore

Cities with name “washington” within 50 miles Of cities with name “baltimore”

Page 39: OGC Geospatial Summit  September 15, 2008

Cities with name “washington” not within 50 miles Of cities with name “baltimore”

geo.cityname = washington 

prox/distance<=50/geo.unit=miles/not

geo.cityname=baltimore

Proximity Exclusion(a 2.0 feature)

Page 40: OGC Geospatial Summit  September 15, 2008

Window Relation (a 2.0 feature)

dc.title window/distance<5/unit=word

"fries salt vinegar" 

fries, salt, and vinegar all within a span of 5 words

Page 41: OGC Geospatial Summit  September 15, 2008

geo.region Window/distance<200/geo.unit=miles/cityname

“baltimore washington richmond"

  Regions containing cities with names Baltimore,

Washington, and Richmond within a 200 mile area.

Page 42: OGC Geospatial Summit  September 15, 2008

Context sets

Page 43: OGC Geospatial Summit  September 15, 2008

Context sets Indexes

Relations

Relation modifiers

Boolean Modifiers

Page 44: OGC Geospatial Summit  September 15, 2008

subject any/relevant "fish frog“

find records whose subject field includes words like shark, tuna, coelocanth, toad, amphibian, etc.  

Page 45: OGC Geospatial Summit  September 15, 2008

subject any/relevant "fish frog"

index relationRelationmodifier

Subject to context qualification

Page 46: OGC Geospatial Summit  September 15, 2008

dc.subject any/relevant "fish frog"

Context set

Page 47: OGC Geospatial Summit  September 15, 2008

dc.subject any/rel.lr "fish frog"

A specific Relevance algorithn

Context set

Page 48: OGC Geospatial Summit  September 15, 2008

geo.bounds within/partial/geo.nwse   "43.772 -101.411 31.7723 -77.7499") and        (geo.keywords any "biologic ecologic"

Page 49: OGC Geospatial Summit  September 15, 2008

geo.bounds within/partial/geo.nwse   "43.772 -101.411 31.7723 -77.7499") and        (geo.keywords any "biologic ecologic"

Break that down…….

Page 50: OGC Geospatial Summit  September 15, 2008

geo.bounds within/partial/geo.nwse

 "43.772 -101.411 31.7723 -77.7499"

and        geo.keywords any "biologic ecologic"

Page 51: OGC Geospatial Summit  September 15, 2008

((geo.keyword = "ozone")

and

      (geo.bounds within/partial/geo.nwse "58.45 -11.95 33.72 24.61")and      ((geo.begdate >= /isodate 20040101) and (geo.enddate <= /isodate 20071231)))

Page 52: OGC Geospatial Summit  September 15, 2008

SRU – Search/Retrieve via URL

Page 53: OGC Geospatial Summit  September 15, 2008

SRU – Search/Retrieve via URL

Features

Result sets

Page 54: OGC Geospatial Summit  September 15, 2008

SRU – Search/Retrieve via URL

Features

Result sets Result set refinement Request specific records Sorting

Page 55: OGC Geospatial Summit  September 15, 2008

Result sets

Retrieval

Page 56: OGC Geospatial Summit  September 15, 2008

Result sets

Retrieval Ability to request records in a particular

XML schema, e.g.• MODS• DC• GML

Page 57: OGC Geospatial Summit  September 15, 2008

Result sets

Retrieval

Application Specific Diagnostics

Page 58: OGC Geospatial Summit  September 15, 2008

http://www.search.gov/gsdi/sru2kml.php? operation=searchRetrieve&version=1.1&   maximumRecords=100&recordSchema=GML&   query=(geo.bounds within/partial/nwse   "43.772 -101.411 31.7723 -77.7499") and        (geo.keywords any "biologic ecologic")

Page 59: OGC Geospatial Summit  September 15, 2008

http://www.search.gov/gsdi/sru2kml.php?

operation=searchRetrieve&version=1.1& startRecord=30& maximumRecords=15&recordSchema=GML& 

  query=

geo.bounds within/partial/nwse   "43.772 -101.411 31.7723 -77.7499") and        (geo.keywords any "biologic ecologic"

Server

Parameters

query

Page 60: OGC Geospatial Summit  September 15, 2008

http://www.search.gov/gsdi/sru2kml.php?

operation=searchRetrieve&version=1.1& startRecord=30& maximumRecords=15&recordSchema=GML& 

  query=

geo.bounds within/partial/nwse   "43.772 -101.411 31.7723 -77.7499") and        (geo.keywords any "biologic ecologic"

Server

Parameters

query

Operation and version parameters (gone in 2.0)

Page 61: OGC Geospatial Summit  September 15, 2008

http://www.search.gov/gsdi/sru2kml.php?

 startRecord=30& maximumRecords=15&recordSchema=GML& 

  query=

geo.bounds within/partial/nwse   "43.772 -101.411 31.7723 -77.7499") and        (geo.keywords any "biologic ecologic"

Server

Parameters

query

Page 62: OGC Geospatial Summit  September 15, 2008

Oasis SWS TC – Phase 1 Abstract Protocol Definition

From which bindings are derived.

Bindings SRU 1.2 specification (+CQL 1.2) Opensearch

Page 63: OGC Geospatial Summit  September 15, 2008

Phase 2 SRU/CQL 2.0

Description Language


Top Related