On Wed, 5 Sep 2018 at 17:31, Mathieu Lonjaret
<[email protected]> wrote:
>
> On Wed, 5 Sep 2018 at 13:10, Christian von Kietzell
> <[email protected]> wrote:
> >
> > Hi,
> >
> > On Tue, Sep 04, 2018 at 10:10:40PM +0200, Mathieu Lonjaret wrote:
> > > Good job figuring out the search queries. :-)
> >
> > Thanks. I also figured out this morning, why the search didn't work when
> > using the "Expression" field of SearchQuery instead of an explicit
> > constraint.
> >
> > Apparently, to use "filename:..." a permanode for the file has to exist.
> > It also doesn't work if I just "pk put file" a file and then do "pk
> > search filename:...". If I upload a file in the web UI, it creates a
> > permanode, after which pk search can find the file.
> >
> > It's a little puzzling to me that it works like it does. I was under the
> > impression that a simple search expression would be parsed and then
> > essentially be equivalent to my explicit search query.
>
> what you're witnessing is not specific to files. Permanodes are the
> live objects in Perkeep. Anything that is not somehow connected to a
> permanode is considered like an orphan if you will. In fact, it would
> eventually maybe get garbage collected (if we had such a thing as a
> working GC). So when you upload a file, but you don't connect it (in
> any way) to a permanode, it's as if this file was dead to the system
> (even though in practice you can still find it with the right query,
> as you found out).
> That is why the "filename" search predicate translates into a search
> query for a _permanode_ that links to the requested file.
>
> That reminds me that I had a documentation CL for that, which never
> got merged. And since you won't be the last one to ask about it, I
> think it's high time we merged it.

And it is now live at: https://perkeep.org/doc/files-and-permanodes

> > > And I don't think LoadAllChunks is necessary.
> >
> > What's it good for then?
>
> From what I gather, it prefetches all the parts of the file. They
> don't seem to be explicitly stored anywhere, so my guess would be that
> the point is to "warm up" whatever caches along the way where they
> would end up once downloaded.
>
> > > btw, you can also inspire yourself from all the other existing 3rd
> > > party clients within the project to see how they interact with the
> > > API, namely: the web UI (server/perkeepd/ui), and the apps
> > > (app/publisher and app/scanningcabinet).
> >
> > I will certainly do that. Thanks for all your help :-)
> >
> >
> > Regards,
> > Chris
> >
> > --
> > Nothing to see here. Move along.
> >
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Perkeep" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to [email protected].
> > For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Perkeep" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to