2007/1/15, Jamie McCracken <<a href="mailto:jamiemcc@blueyonder.co.uk">jamiemcc@blueyonder.co.uk</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mikkel Kamstrup Erlandsen wrote:<br><br>> The return value could be stripped of all maps and use the same ordering<br>> of properties as in the properties input value. Fx the call:<br>><br>> GetHitProperties (query_handle,0, 2, ["uri", "dc:title", "mime"])
<br>><br>> could return:<br>><br>> [<br>> ["<a href="file:///home/mikkel/delta_comp.pdf">file:///home/mikkel/delta_comp.pdf</a><br>> <<a href="file:///home/mikkel/delta_comp.pdf">file:///home/mikkel/delta_comp.pdf
</a>>", "Delta Complexes", "application/pdf"]<br>> ["<a href="file:///home/mikkel/summa.svg">file:///home/mikkel/summa.svg</a>", "Summa Logo", "image/svg+xml"]
<br>> ]<br>><br>> From an optimization point of view this is probably the best we can<br>> get. This is also how track er currently does, and it is relatively easy<br>> to work with.<br>><br>> The reason why I'm hesitating to go for this solution is the live api.
<br>> It would be really nice to be able to use the same data structures here.<br>> The live api however has a need to be able to tell the consumer that<br>> *this particular hit* has become invalid.<br>><br>> A way around this could be to always have the first element in the
<br>> response list be a unique hit identifier. Or the last element for that<br>> matter - this way the returned properties would have the same indices as<br>> the requested properties.<br><br>or just make sure the result set always includes the HitID as the first
<br>element and the rest follows the same order as the properties list. The<br>HitID can then be used in live queries to signal changes.<br><br>(in tracker, the uri is always the first element and the rest follow the<br>order of the properties though I could easily change this to a HitID)
<br><br>><br>> We could ease up on the global-identifier thing, and just let the<br>> identifier be relative to the given query handle.<br>><br>> - Using URI as key: as previously stated I think that this is a bad
<br>> idea.<br>><br>><br>> +1<br><br>I am not bothered whether we use the uri or a HitID to uniquely identify<br>the hit - I suspect most clients (Nautilus, Deskbar, T-S-T,<br>beagle-search) will probably use the uri even with the (negligible) race
<br>conditions.</blockquote><div><br>The HitID would be opaque, so any server could use the uri if it wanted to do that.<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
If a HItID is used it could place extra burden on the client to manage<br>HitID->URI transfers. I guess looking at real world apps and their needs<br>will determine which is more suitable...</blockquote><div><br><br>I don't think I understand the complications... What is the problem in requesting the uri property of the hits?
<br></div><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> - Accessing Snippets individually: no need for GetSnippets(), use:
<br>> GetHitProperties(query_handle, offset, 1, ["Snippet"])<br>><br>><br>> As far as I can tell, this is the general consensus...<br><br>yes thats fine - just need a list of all the common properties :)
</blockquote><div><br>I fear that this has to wait for the metadata spec... Maybe we could agree on a small set of absolutely needed properties (like, uri, snippet and mime) .<br><br></div>Cheers,<br>Mikkel<br></div>