KEYWORD-BASED SEARCH METHODS
Elmurod Kuriyozov
Keyword Search over Structured Data
The Foundations
Outline
The Data Graph
Captures relationships and their strengths, among data and metadata items
Nodes
Edges
Querying the Data Graph
Data Graph Example – Gene Terms, Classifications, Publications
Term
Term2�Ontology
Entry2�Pub
Pubs
acc
name
...
go
_
id
entry
_
ac
Standard
abbrevs
abbrev
term
entry
_
ac
pub
_
id
...
pub
_
id
...
title
Entry
entry
_
ac
name
...
pub
publication
GO
:
00059
plasma membrane
...
Querying the Data Graph
Term
Term2�Ontology
Entry2�Pub
Pubs
acc
name
...
go
_
id
entry
_
ac
Standard
abbrevs
abbrev
term
entry
_
ac
pub
_
id
...
pub
_
id
...
title
Entry
entry
_
ac
name
...
pub
publication
GO
:
00059
plasma membrane
...
membrane
publication
Relational query 1 tree: Term, Term2Ontology, Entry2Pub, Pubs
Relational query 2 tree: Term, Term2Ontology, Entry, Pubs
title
An index to tables,
not part of results
Trees to Ranked Results
Each query Steiner tree becomes a conjunctive query
Query tree 1 becomes:
q1(A,P,T) :- Term(A, “plasma membrane”), Term2Ontology(A, E), Entry2Pub(E, P), Pubs(P, T)
Computing and executing this query yields results
Where Do Weights Come from?
Node weights:
Edge weights:
In some systems the weights are all learned
Scoring Query Results
Outline
Top-k Answers
Graph Expansion
Basic process:
Term
Term2�Ontology
Entry2�Pub
Pubs
acc
name
...
go
_
id
entry
_
ac
entry
_
ac
pub
_
id
...
pub
_
id
...
title
GO
:
00059
plasma membrane
...
membrane
title
What Is the Expansion Process?
Assumptions here:
Two main heuristics:
Querying the Data Graph
Term
Term2�Ontology
Entry2�Pub
Pubs
acc
name
...
go
_
id
entry
_
ac
Standard
abbrevs
abbrev
term
entry
_
ac
pub
_
id
...
pub
_
id
...
title
Entry
entry
_
ac
name
...
pub
publication
GO
:
00059
plasma membrane
...
membrane
publication
title
Graph vs. Attribute-Based Scores
score = … + weight1 * T1.attrib1 + weight2 * T2.attrib2 + …
Threshold-based Merging with Random Access
L1: Index �on x1
L2: Index �on x2
Lm: Index �on xm
…
Threshold-based Merge
k best ranked results
cost = t(x1,x2,x3,…, xm)
The Basic Thresholding Algorithm with Random Access (Sketch)
In parallel, read each of the indices Li
An Example: Tables & Indices
name | location | rating | price |
Alma de Cuba | 1523 Walnut St. | 4 | 3 |
Moshulu | 401 S. Columbus bldv. | 4 | 4 |
Sotto Varalli | 231 S. Broad St. | 3.5. | 3 |
Mcgillin’s | 1310 Drury St. | 4 | 2 |
Di Nardo’s Seafood | 312 Race st. | 3 | 2 |
rating | name |
4 | Alma de Cuba |
4 | Moshulu |
4 | Mcgillin’s |
3.5 | Sotto Varalli |
3 | Di Nardo’s Seafood |
(5-price) | name |
3 | McGillin’s |
3 | Di Nardo’s Seafood |
2 | Alma de Cuba |
2 | Sotto Varalli |
1 | Moshulu |
Full data:
Lrating: Index by ratings
Lprice: Index by (5 - price)
Reading and Merging Results
rating | name |
4 | Alma de Cuba |
4 | Moshulu |
4 | Mcgillin’s |
3.5 | Sotto Varalli |
3 | Di Nardo’s Seafood |
(5-price) | name |
3 | McGillin’s |
3 | Di Nardo’s Seafood |
2 | Alma de Cuba |
2 | Sotto Varalli |
1 | Moshulu |
Lratings
Lprice
talma = 0.5*4 + 0.5*2 = 3
Cost formula: t(rating,price) = rating * 0.5 + (5 - price) * 0.5
tmcgillins = 0.5*4 + 0.5*3 = 3.5
τ = 0.5*4 + 0.5*3 = 3.5
no tuples above τ!
Reading and Merging Results
tmoshulu = 0.5*4 + 0.5*1 = 2.5
tdinardo’s = 0.5*3 + 0.5*3 = 2.5
rating | name |
4 | Alma de Cuba |
4 | Moshulu |
4 | Mcgillin’s |
3.5 | Sotto Varalli |
3 | Di Nardo’s Seafood |
(5-price) | name |
3 | McGillin’s |
3 | Di Nardo’s Seafood |
2 | Alma de Cuba |
2 | Sotto Varalli |
1 | Moshulu |
Lratings
Lprice
talma = 0.5*4 + 0.5*2 = 3
Cost formula: t(rating,price) = rating * 0.5 + (5 - price) * 0.5
tmcgillins = 0.5*4 + 0.5*3 = 3.5
τ = 0.5*4 + 0.5*3 = 3.5
no tuples above τ!
Reading and Merging Results
tmoshulu = 0.5*4 + 0.5*1 = 2.5
tdinardo’s = 0.5*3 + 0.5*3 = 2.5
rating | name |
4 | Alma de Cuba |
4 | Moshulu |
4 | Mcgillin’s |
3.5 | Sotto Varalli |
3 | Di Nardo’s Seafood |
(5-price) | name |
3 | McGillin’s |
3 | Di Nardo’s Seafood |
2 | Alma de Cuba |
2 | Sotto Varalli |
1 | Moshulu |
Lratings
Lprice
talma = 0.5*4 + 0.5*2 = 3
Cost formula: t(rating,price) = rating * 0.5 + (5 - price) * 0.5
tmcgillins = 0.5*4 + 0.5*3 = 3.5
these have already been read!
Reading and Merging Results
tsotto = 0.5*3.5 + 0.5*2 = 2.75
tmoshulu = 0.5*4 + 0.5*1 = 2.5
tdinardo’s = 0.5*3 + 0.5*3 = 2.5
rating | name |
4 | Alma de Cuba |
4 | Moshulu |
4 | Mcgillin’s |
3.5 | Sotto Varalli |
3 | Di Nardo’s Seafood |
(5-price) | name |
3 | McGillin’s |
3 | Di Nardo’s Seafood |
2 | Alma de Cuba |
2 | Sotto Varalli |
1 | Moshulu |
Lratings
Lprice
talma = 0.5*4 + 0.5*2 = 3
Cost formula: t(rating,price) = rating * 0.5 + (5 - price) * 0.5
tmcgillins = 0.5*4 + 0.5*3 = 3.5
τ = 0.5*3.5 + 0.5*2 = 2.75
Reading and Merging Results
tsotto = 0.5*3.5 + 0.5*2 = 2.75
tmoshulu = 0.5*4 + 0.5*1 = 2.5
tdinardo’s = 0.5*3 + 0.5*3 = 2.5
rating | name |
4 | Alma de Cuba |
4 | Moshulu |
4 | Mcgillin’s |
3.5 | Sotto Varalli |
3 | Di Nardo’s Seafood |
(5-price) | name |
3 | McGillin’s |
3 | Di Nardo’s Seafood |
2 | Alma de Cuba |
2 | Sotto Varalli |
1 | Moshulu |
Lratings
Lprice
talma = 0.5*4 + 0.5*2 = 3
Cost formula: t(rating,price) = rating * 0.5 + (5 - price) * 0.5
tmcgillins = 0.5*4 + 0.5*3 = 3.5
τ = 0.5*3.5 + 0.5*2 = 2.75
3 are above threshold
Summary of Top-k Algorithms
Outline
Extending Keyword Search from�Databases to Data Integration
Integration poses several new challenges:
✓
🡺
🡺
Scalable Automatic Edge Inference
In a scalable way, we may need to:
Learning to Adjust Weights
Example Query Results & User Feedback
How Do We Learn about Edge and Node Weights from Feedback on Data?
Keyword Search Wrap-up