Query » History » Revision 6
Revision 5 (Alison Craig, 03/03/2015 02:45 PM) → Revision 6/29 (Alison Craig, 03/03/2015 02:54 PM)
Query
=====
The Query parameter are named as <tt>/<query-prefix>/<query-parameters></tt>
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>
In response, the Query backend of the Catalog will make Data available that includes a list of names that match the query.
----
<b>TLV Formats</b>
<b><i>Query Interest TLV</b></i>
<ul>
<li>Type = Interest (0x05)</li>
<li>Length</li>
<li><ul>Value
<li>Type = <tt>[field|?]</tt> (32768+) </li>
<li>Length = 2000 bytes (Want enough room for search)</li>
<li>Value = <tt>[search]</tt></li>
</ul>
</li>
</ul>
<b><i>Query Results Data TLV</b></i>
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:
<ul>
<li>Type = <tt>Name</tt> (0x07)</li>
<li>Length = 4000</tt></li>
<li>Value = Name</li>
</ul>
or next fields (with an autocomplete)
<ul>
<li>Type = <tt>[?]</tt></li>
<li>Length = 4000</tt></li>
<li>Value = Possible next field</li>
</ul>