Project

General

Profile

Query » History » Version 7

Alison Craig, 03/03/2015 02:56 PM

1 1 Alison Craig
Query
2
=====
3 7 Alison Craig
The Query parameter are named as `/<query-prefix>/<query-parameters>`
4 6 Alison Craig
5 1 Alison Craig
For the Query Protocol, the user will send messages of the format: <tt>[field1]=[search1],[field2]=[search2],?=[search3]</tt>, where <tt>field1</tt> and <tt>field2</tt> are Name components, <tt>?</tt> indicates an autocomplete search, and <tt>search*</tt> is what to use for searching on. <i>(See [[Schema]])</i>
6
7
In response, the Query backend of the Catalog will make Data available that includes a list of names that match the query.
8
9
----
10
11
<b>TLV Formats</b>
12
13
<b><i>Query Interest TLV</b></i>
14
<ul>
15
  <li>Type = Interest (0x05)</li>
16
  <li>Length</li>
17
  <li><ul>Value
18 2 Alison Craig
    <li>Type = <tt>[field|?]</tt> (32768+) </li>
19 1 Alison Craig
    <li>Length = 2000 bytes (Want enough room for search)</li>
20 2 Alison Craig
    <li>Value = <tt>[search]</tt></li>
21 1 Alison Craig
  </ul>
22
  </li>
23
</ul>
24 3 Alison Craig
25
<b><i>Query Results Data TLV</b></i>
26 4 Alison Craig
27 5 Alison Craig
The Query results TLV Data matches the Query Interest TLV. It has an added Blob (or payload) of the List of Names that match the Query. This Blob is defined by a second TLV such that we have either Name results:
28
<ul>
29
  <li>Type = <tt>Name</tt> (0x07)</li>
30
  <li>Length = 4000</tt></li>
31
  <li>Value = Name</li>
32
</ul>
33
or next fields (with an autocomplete)
34
<ul>
35
  <li>Type = <tt>[?]</tt></li>
36
  <li>Length = 4000</tt></li>
37
  <li>Value = Possible next field</li>
38
</ul>