Query » History » Version 10
Alison Craig, 03/03/2015 02:59 PM
1 | 1 | Alison Craig | Query |
---|---|---|---|
2 | ===== |
||
3 | 8 | Alison Craig | The Query parameter are named as |
4 | 9 | Alison Craig | |
5 | /<prefix>/query/<query-parameters> |
||
6 | |||
7 | 6 | Alison Craig | |
8 | 10 | Alison Craig | For the Query Protocol, the user will send query parameters 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> |
9 | 1 | Alison Craig | |
10 | In response, the Query backend of the Catalog will make Data available that includes a list of names that match the query. |
||
11 | |||
12 | ---- |
||
13 | |||
14 | <b>TLV Formats</b> |
||
15 | |||
16 | <b><i>Query Interest TLV</b></i> |
||
17 | <ul> |
||
18 | <li>Type = Interest (0x05)</li> |
||
19 | <li>Length</li> |
||
20 | <li><ul>Value |
||
21 | 2 | Alison Craig | <li>Type = <tt>[field|?]</tt> (32768+) </li> |
22 | 1 | Alison Craig | <li>Length = 2000 bytes (Want enough room for search)</li> |
23 | 2 | Alison Craig | <li>Value = <tt>[search]</tt></li> |
24 | 1 | Alison Craig | </ul> |
25 | </li> |
||
26 | </ul> |
||
27 | 3 | Alison Craig | |
28 | <b><i>Query Results Data TLV</b></i> |
||
29 | 4 | Alison Craig | |
30 | 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: |
31 | <ul> |
||
32 | <li>Type = <tt>Name</tt> (0x07)</li> |
||
33 | <li>Length = 4000</tt></li> |
||
34 | <li>Value = Name</li> |
||
35 | </ul> |
||
36 | or next fields (with an autocomplete) |
||
37 | <ul> |
||
38 | <li>Type = <tt>[?]</tt></li> |
||
39 | <li>Length = 4000</tt></li> |
||
40 | <li>Value = Possible next field</li> |
||
41 | </ul> |