Commit Graph

26 Commits

Author SHA1 Message Date
Alex Tsui 3891d3fe51
pkg/search: Add untagged predicate (#1393)
Add `is:untagged` predicate to query untagged permanodes via the UI
2021-08-04 22:28:05 -04:00
Niklas Merz 05f86e7846
importer/twitter: add likes import
Import liked tweets via favorites API

Change-Id: I8000bcd20cd895e540ec4d3b36035531172c7cb6
2018-08-14 17:49:37 +02:00
Brad Fitzpatrick 973df545ef search: support wildcards in filename search
Change-Id: Ic8a1b2cdad3215f7e850bcc47467e0b4f8e92c4f
2018-04-20 13:36:43 -07:00
Brad Fitzpatrick 194d4f9443 blobserver, all: add contexts to ReceiveBlob, Fetch & million resulting deps
I had intended for this to be a small change.

I was going to just add context.Context to the BlobReceiver interface,
but then I saw blob.Fetcher could also use one, so I decided to do two
in one CL.

And then it got a bit infectious and ended up touching everything.

I ended up doing SubFetch in the process by necessity.

At a certain point I finally started using context.TODO() in a few
spots, but not too many. But removing context.TODO() will come in the
future. There are more blob storage interfaces lacking context, too,
like RemoveBlobs.

Updates #733

Change-Id: Idf273180b3f8e397ac5929c6d7f520ccc5cdce08
2018-01-18 16:22:16 -08:00
Brad Fitzpatrick 11e9c5567c Move some packages from perkeep.org/pkg to perkeep.org/internal
Notably: pkg/misc all moves.

And pkg/googlestorage is deleted, since it's not used. Only the
x/net/http2/h2demo code used to use it, but that ended in
https://go-review.googlesource.com/33230 (our vendored code is old).
So just nuke that dir for now. When it's refreshed, it'll either be
gone (dep prune) or new enough to not need googlestorage.

Also move pkg/pools, pkg/leak, and pkg/geocode to internal.

More remains.

Change-Id: I2640c4d18424062fdb8461ba451f1ce26719ae9d
2018-01-01 20:54:48 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
Steven L. Speek 13c084739c search: expression/constraint aliases
The search handler can store and retrieve search aliases.
Keyword namedSearch handles these new atoms of the form
named:foo.

Creating an alias has been implemented using a client in
the camtool subcommands named-search-get and named-search-set.

Change-Id: I7960f83bad464eb1a971c07f33631744a5eea814
2017-12-29 21:41:20 -08:00
Paul Lindner c58e07942e all: lint fixes for "if block ends with a return statement"
Change-Id: I1c244f14995478860c19695695f287d541a7a39c
2017-12-13 11:31:25 -08:00
Paul Lindner b09cd377d7 Switch to stdlib context from golang.org/x/net/context
This switches most usages of the pre-1.7 context library to use the
standard library.  Remaining usages are in:

  app/publisher/main.go
  pkg/fs/...

Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
2017-11-26 01:12:26 -08:00
mpl 088cdae82d server/camlistored/ui: map aspect improvements
-keep the browser URL bar in sync with the current search/zoom-level

-introduce the "map:" predicate, to be used as the current viewport in
the map aspect. This was previously achieved with the locrect predicate. We
try to keep this new predicate unknown to the server, and replaced on
the fly by an equivalent locrect predicate.

-stay on the map aspect when the search expression has a map predicate.
Same thing when loading a URL with a map predicate parameter: try to
load directly on map aspect, instead of going to search aspect first.

-make sure there's only at most one map query in flight at all times

Change-Id: Ibf928ee5c926670c221f212f14ca9799e1e7bb79
2017-08-29 18:13:07 +00:00
mpl 2d3b781103 pkg/search: add "ref:" predicate support
The "ref:prefix" search predicate is simply the equivalent of the

Constraint {
	BlobRefPrefix: prefix,
}

search constraint.

The "ref:prefix" search expression was already supported by the search
box of the web UI, but as opposed to (all, I think) other search
expressions, it was not supported server-side. Which means, it had to be
converted to a search Constraint as the above, before being sent in the
query.

This change therefore fixes this inconsistency. In addition, but
relatedly, since the map aspect relies on expressing the zoom-level as a
locrect expression, it is much simpler if the search query it uses only
has to be constructed from search expressions, and without search
constraints. So if we want to be able to support marking a single node
search with the map aspect, while dealing only with search expressions,
this change is necessary.

Fixes #939

Change-Id: Ia58f410198ecd1f7e0981321da370d687df3a120
2017-08-17 01:23:55 +02:00
mpl 1e56d64ee8 pkg/search: support location area predicate
This change adds the "locrect" search predicate, which works like the
"loc" predicate, except it allows to specify the coordinates of a
rectangular area as a location, instead of a named location.

The coordinates are the latitude and longitude of the North-East corner
of the rectangle, followed by the latitude and longitude of the
South-West corner. For example: locrect:48.63,-123.37,46.59,-121.28

Related: issue #934

Change-Id: I0cf39c1d0b49d557b2081f07b2c8b4508ccfc052
2017-07-20 01:34:27 +02:00
Attila Tajti 1dad8f33da search: unify location Query with Describe
Use index/LocationHandler.PermanodeLocation instead of
index/Corpus.PermanodeLatLong for location matching.

Remove fileLoc constraint from location and hasLocation
predicates. They are now handled by index/LocationHandler.

index: Remove Corpus.PermanodeLatLong, its functionality
is now moved to search.

Change-Id: I01e72661470ffb9376f3491401db4e2ce7f8a131
2016-11-17 08:59:27 +01:00
Kate Pek 26d161db21 search: search by "with" keyword
Change-Id: Ic8c5d79a0367012aa24de2d13e66384c8cddd738
2016-05-05 16:57:34 -07:00
mpl e0d719ba21 pkg/types: remove
Most of it replaced with vendor/go4.org/types and
vendor/go4.org/readerutil

u32 went where needed in pkg/blobserver/*
invertedBool went in pkg/types/serverconfig
atomics64 went in pkg/fs

Change-Id: I230426cda35be4b45ed67e869f14e6fdae89be22
2016-02-05 18:28:47 +01:00
Attila Tajti 34ad44385b pkg/search: add parentof search expression
Change-Id: I74f6f5411355a0b0864739f135331ba304245ddb
2016-02-03 10:31:51 +01:00
Brad Fitzpatrick 322bc1b11c search: fix the build
Change-Id: I5b8dbe7cd2c0923555c3293d6ed348d785995619
2015-12-24 09:28:12 -08:00
Brad Fitzpatrick 4b5403dd53 search: add filename predicate
Change-Id: I43397542bbb333aad6074298444376798c847c63
2015-12-24 09:22:27 -08:00
Tamás Gulácsi 9f7e1df32b Remove pkg/context
Use golang.org/x/net/context instead.

Fixes #648.

Change-Id: I676a2f25458be97610a49d6f954f2102cbd373fa
2015-12-12 23:09:02 +01:00
Brad Fitzpatrick 17fc1906d8 search: fix typo in is:portrait
Change-Id: Icaf9fcc9196d56b76733f16e84ea059b8493f18f
2014-06-26 11:36:53 -07:00
Steven L. Speek 3fc2669025 search: empty string values for attr and tag predicates
Fixes issue_461

Change-Id: I94cba8be70f30eca456d990ba4f4db2618b24553
2014-06-22 20:11:37 +02:00
Brad Fitzpatrick bf3d86e471 search: add attribute substring search
Change-Id: I3b30541c43b5fba84491b98ed73d34a64465c24e
2014-06-20 12:10:20 -07:00
Brad Fitzpatrick a57da00936 search: add is:post and is:checkin
Change-Id: I0d7c5f969de5a5c6bbf6dfd7acfb4774f0a00d4a
2014-06-20 11:30:30 -07:00
Steven L. Speek 9d5218c063 search: has:location works on images and permanodes
fixes issue 457

Change-Id: I0279c2d294706a2347039fd30a6c982a72455920
2014-06-15 18:53:44 +02:00
Steven L. Speek 3688c15e47 search: keywords check their number of arguments
Change-Id: I04e8fc4a91c58bc91e3b860d43be840e5359e6e2
2014-05-23 20:03:48 +02:00
Steven L. Speek db1a4cf6aa search: Self-documenting atoms
Parse errors in the atoms have a position too
Easier to add new search predicates

Change-Id: I9d2e890b9afcfb524aafa8f1e4e1debc683555ac
2014-05-15 00:42:32 +02:00