1 / 100

CQL

CQL “Common Query Language” Ray Denenberg March 2005 CQL’s Goals Combine the simplicity and intuitiveness of google searching with the expressive power of Xquery. Support very simple queries; and arbitrarily complex expressions as necessary. Example: search on “cat” cat cat

paul2
Download Presentation

CQL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CQL “Common Query Language” Ray Denenberg March 2005

  2. CQL’s Goals • Combine the simplicity and intuitiveness of google searching with the expressive power of Xquery. • Support very simple queries; • and arbitrarily complex expressions as necessary. Example: search on “cat”

  3. cat

  4. cat (That’s it. The whole query.)

  5. Simple CQL Queries • cat • cat and dog • title = cat

  6. Simple CQL Queries • cat (simplest) • cat and dog (simple boolean) • title = cat (index)

  7. Simple CQL Queries • cat (simplest) • cat and dog (simple boolean) • title = cat (index) • dc.title = cat(index qualified)

  8. Boolean • cat and dog • cat or dog • Cat not dog

  9. Boolean • cat and dog • cat or dog • Cat not dog • cat not dog and fish or frog

  10. Boolean • cat not dog and fish or frog • evaluates to:(((cat not dog) and fish) or frog)

  11. Boolean • cat not dog and fish or frog • evaluates to:(((cat not dog) and fish) or frog) • Not:(cat not dog) and (fish or frog)

  12. index Search • title = cat

  13. Qualified index • title = cat • dc.title = cat • bib.title = cat • Bath.keyTitle

  14. Fielded/index Search • dc.title = cat • bib.title = cat

  15. dc.title A name given to the resource • bib.title(fictitious)A word, phrase, character, or group of characters, normally appearing in an item, that names the item or the work contained in it.     

  16. Zthes Indexes zthes.nt=sauropod and zthes.bt=macronaria narrower than sauropod but broader than macronaria.

  17. Relations

  18. Relations The triple: <index> <relation> <search term> (e.g. title = cat) Is called a: Search Clause

  19. Relations <index> <relation> <search term>

  20. Simple Relations • Title = "the complete dinosaur" • title all "complete dinosaur“ • title any "dinosaur bird reptile" • title exact "the complete dinosaur"

  21. the = relation • Title = "the complete dinosaur“ (find these three words, adjacent and in this order)

  22. Title = "the complete dinosaur“ • matches “a day in the life of the complete dinosaur“ • and“the complete dinosaur goes to Paris“

  23. = • Title = "the complete dinosaur“ • matches “a day in the life of the complete dinosaur“ • and“the complete dinosaur goes to Paris“ • but not “the complete and unabridged dinosaur"

  24. All • Title all "complete dinosaur“ • matches “the complete and unabridged dinosaur“ • does not match “the unabridged dinosaur“

  25. Title all "dinosaur bird reptile“ • does not match “the completedinosaur"

  26. Any • Title any "dinosaur bird reptile“ • doesmatch “the complete dinosaur" and • “the unabridged dinosaur"

  27. Exact • title exact "the complete dinosaur" matches "the complete dinosaur"

  28. Exact • title exact "the complete dinosaur" matches "the complete dinosaur" Does not match: “a day in the life of the complete dinosaur or“the complete dinosaur goes to Paris“ or“the complete and unabridged dinosaur “

  29. Relations …. observations

  30. Relations …. observations • Observation 1: Shorthand

  31. title all "old man sea" same as • title="old" and title="man" and title="sea"

  32. Relations …. observations • Observation 2: Anchoring ^ The anchor character

  33. Recall ……. • Title = "the complete dinosaur“ • matches “a day in the life of the complete dinosaur“

  34. Anchoring • title="^the complete dinosaur"would not match “a day in the life of the complete dinosaur”

  35. Anchoring • title="^the complete dinosaur" would not match “a day in the life of the complete dinosaur” • title="the complete dinosaur^"would not match “the complete dinosaur goes to Paris”

  36. Relations …. observations • Observation 3: Index and Relation go together

  37. Index and Relation go together • Cat • Title = cat

  38. Index and Relation go together • Cat • Title = cat • Title cat • = cat

  39. Index and Relation go together • Cat • Title = cat • Title cat • = cat

  40. BNF searchClause ::='(' cqlQuery ')‘ | index relation searchTerm | searchTerm

  41. Basic Relations …. summary • Title = "the complete dinosaur" • title all "complete dinosaur“ • title any "dinosaur bird reptile" • title exact "the complete dinosaur"

  42. A few more relations … • < less • > greater • <= less or equal • >=greater or equal • = (see next) • <> not equal

  43. = relation = means: • word adjacency, when the term is a list of words. • Equality, otherwise.

  44. RelationModifiers • Stem • relevant • Fuzzy • phonetic

  45. Stemming • title =/stem"these completed dinosaurs“ matches • The Complete Dinosaur.

  46. Relevance subject any/relevant "fish frog" would find records whose subject field included words like shark, tuna, coelocanth, toad, amphibian, etc.

  47. Relation Modifiers • Stem • relevant • Fuzzy • phonetic

  48. fuzzy • Fuzzy means: • “be liberal in what you count as a match … details left to the server. Might include permutations of character order, off-by-one for numerical terms.” • Title =/fuzzy “sharlot simmins” might match “I am Charlotte Simmons” • telephoneNumber exact/fuzzy “303 441 1319"

  49. Relation Modifiers • Stem • relevant • Fuzzy • phonetic

  50. Phonetic • Match words that sound the same e.g. Hostel might match “hostile”

More Related