perkeep/pkg/search
mpl 03103f00fa pkg/search: add some DirConstraint search functionality
The DirConstraint type already existed but wasn't functional as none of
the matching for any of its fields was implemented.

That functionality is required by two other features:

1) Browsing directories in the publisher requires getting information
about the children of the directory. In practice that can be achieved
with a search on the directory, accompanied with some describe rules.
But that comes with limitations, such as:
-no control over the sorting of the described children in the response
-max number of children in the response (and no way to overcome it since
you can't "continue" on a describe)
hence the need for a direct search of a directory's children.
This is implemented as DirConstraint/FileConstraint.ParentDir and will
be used in https://camlistore-review.googlesource.com/8286

2) Looking for files/directories shared by transitivity.
Knowing if an item is the target of a share claim is easy enough once
enough of ClaimConstraint is implemented. But in order to find out if an
item is effectively shared because one of its ancestors (directory) is
the target of a share claim, with transitivity set, we need some sort of
search that can do directories traversal. This is implemented as
DirConstraint.RecursiveContains and it will be used as a subquery in
https://camlistore-review.googlesource.com/9866.

Now implemented:
	DirConstraint.FileName
	DirConstraint.BlobRefPrefix
	DirConstraint.ParentDir
	DirConstraint.TopFileCount
	DirConstraint.Contains
	DirConstraint.RecursiveContains

ParentDir will also allow us to quit relying on the treeHandler in the
web UI,
and to use the more generic search queries mechanism instead.

Change-Id: I022cb51732ee4271906271fd75c6f737856b6165
2018-05-01 17:55:41 -07:00
..
testdata search, index: rewrite, fix the "map" sort algorithm, index camliNodeType 2018-04-26 15:19:03 -07:00
describe.go pkg/search: add some DirConstraint search functionality 2018-05-01 17:55:41 -07:00
describe_test.go pkg/search: start to make funcs use a GPG key ID instead of blobRef 2018-02-07 00:54:38 +01:00
export_test.go internal/geocode: change Lookup behavior wrt to AltLookupFn 2018-04-25 18:01:39 -07:00
expr.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
expr_test.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
handler.go pkg/search: start to make funcs use a GPG key ID instead of blobRef 2018-02-07 00:54:38 +01:00
handler_test.go pkg/search: start to make funcs use a GPG key ID instead of blobRef 2018-02-07 00:54:38 +01:00
lexer.go Rename import paths from camlistore.org to perkeep.org. 2018-01-01 16:03:34 -08:00
lexer_test.go search: Self-documenting atoms 2014-05-15 00:42:32 +02:00
match_test.go pkg/types: remove 2016-02-05 18:28:47 +01:00
predicate.go search: support wildcards in filename search 2018-04-20 13:36:43 -07:00
predicate_test.go Move more packages out of pkg/ and into internal/ 2018-01-02 21:03:30 -08:00
query.go pkg/search: add some DirConstraint search functionality 2018-05-01 17:55:41 -07:00
query_test.go pkg/search: add some DirConstraint search functionality 2018-05-01 17:55:41 -07:00
search.go all: more renaming of Camlistore to Perkeep 2018-01-30 03:02:56 -08:00
websocket.go all: more log spam & logging consistency cleanup 2018-04-22 11:30:02 -07:00