Commit Graph

339 Commits

Author SHA1 Message Date
mpl 1f2b140bbd search handler: formalized and split serveClaims
Plus a few related cleanups (better httputil use).

Change-Id: I9ea34f2fe658624d05b7a6f347f5d946759a07b5
2013-02-12 01:18:46 +01:00
Brad Fitzpatrick f1845db855 search: split metaMap into metaMap and metaMapThumbs
Change-Id: I5a29166be7ed44a7c6a954ba689f1f3dbfbe57d7
2013-02-10 12:59:05 -08:00
Brad Fitzpatrick 7300184066 httputil, search: more HTTP util usage, deleting code.
Change-Id: I90e51a3e8b3fdd868b26a40446f9715aaa7f89c0
2013-02-08 22:21:09 -08:00
Brad Fitzpatrick e624e24c46 httputil/handler: start of more formal approach to input validation and HTTP error handling
Change-Id: I219a6263e1ba2d0e64819c01a885078dbf1c8b4c
2013-02-08 19:04:24 -08:00
Brad Fitzpatrick 3605285924 Add pkg/types with types.Time3339; use it in search/handler JSON types
Change-Id: I79bf1484ef8b3548bca2e732f189352bcfbcd6db
2013-02-08 18:10:31 -08:00
mpl 0a84607099 search handler: all funcs now rid of manual maps responses.
serveDescribe, servePermanodesWithAttr, and serveSignerPaths
rewritten like serveRecent. Got rid of populateJSON.

http://code.google.com/p/camlistore/issues/detail?id=101

Change-Id: Id730d40005476634b138b13260248e497d1a87d0
2013-02-09 02:12:06 +01:00
Brad Fitzpatrick 76735113f9 fs: recent directory works.
Change-Id: I13fb418e7ef32c8be8ab635b8179fbded5e18c79
2013-02-07 22:43:50 -08:00
Brad Fitzpatrick e867ea7dc0 client, search, fs: cammount now getting search queries back
Change-Id: I68541e9f9d54fa4240872d440972ad39f6bad33f
2013-02-07 21:55:17 -08:00
Brad Fitzpatrick a068e4d7aa search: separate out query logic from HTTP/JSON on GetRecentPermanodes
Change-Id: I4afb34aa548e83a2db2374a4cca2a9d5368473be
2013-02-07 21:34:25 -08:00
Brad Fitzpatrick f8639c5c5c search: fix error message
Change-Id: Ic89e3a32a919414746eeb1c96f3b694fabf9798a
2013-02-07 19:20:37 -08:00
Brad Fitzpatrick cfa43225d4 search: move thumbnailSize out into a func
Change-Id: If7d6ab242fe7fcef2174aa9dad12a85a06ce0091
2013-02-07 09:40:59 -08:00
Brad Fitzpatrick 6cc5f33da1 search: handler response type cleanup (Issue 99).
Notably, don't mix 'meta' bag keys with rest of response. Makes it easier for both Go and Closure types to not mix keys from one type with another type.

Change-Id: I65e51f2a6c236c5111b5a9b88830e1220d6b29d4
2013-02-07 09:33:00 -08:00
Brad Fitzpatrick c34fc8c345 search: use a struct for recent items, not manual map
Change-Id: I443983b3689434afc0471a55357a78d03c0bb18f
2013-02-07 08:05:31 -08:00
Brad Fitzpatrick 5a8afdf951 search: rename populateJSONThumbnails to populateJSONAndThumbnails
Change-Id: Ibd4db3909c01c8a352df1875de703c71d657c428
2013-02-07 07:54:45 -08:00
Brad Fitzpatrick 6e35c1c26e search: don't fail the whole search request if dir info isn't available
Change-Id: Iae78d099c608dbe41f8ce9ccad1a11d70d212c48
2013-01-20 11:12:32 -08:00
mpl 67c5678062 Index directories with "fileinfo", and use this to
find their name in a search request.

Fixes http://code.google.com/p/camlistore/issues/detail?id=79

Change-Id: I755afd8f52dbd2f8a48ba72bed0a6b0192d1dd71
2013-01-09 16:59:04 +01:00
Brad Fitzpatrick 31df4a7a01 Add generic file icon.
Change-Id: I23517e6112ddfd7048a575161a7785b73fb7bd0f
2012-12-06 17:36:34 -08:00
mpl d1e5a1d4c6 search UI: find all roots
This change allows to find all roots (permanodes with the
"camliRoot" attribute) from the search.html ui page.
To achieve that, func (x *Index) SearchPermanodesWithAttr
now uses a prefix string without the query part if the
query is "".

http://code.google.com/p/camlistore/issues/detail?id=35

Change-Id: I396fba683e6e7b2296d1f0df8009c07e3c2cd09d
2012-11-14 11:11:40 +01:00
mpl ffcbad9528 fix search handler test:
leading slash for thumbnailSrc removed

Change-Id: If402235986d12bfbba11bbaf4f82d5cb051ec226
2012-11-12 23:20:24 +01:00
mpl def34eff94 display thumbnail on the permanode page if content is image.
The serveDescribe search handler now also checks for the
thumbnails req parameter and uses populateJSONThumbnails.
As a result, the client side can directly use thumbnailSrc
from the json response.

http://code.google.com/p/camlistore/issues/detail?id=62

Change-Id: I4ff606f8d3ef291490f05cabdc66219744b53638
2012-11-10 00:04:44 +01:00
mpl 438ae4ecb4 recent permanodes thumbnails
Change-Id: I140766df4b58853e5bc4358f564cf1cfc807882a
2012-11-09 19:43:18 +01:00
Brad Fitzpatrick ef47a3533e index: fix deadlock, document PeerBlob and friends' lock rules, rename lk to mu 2012-11-09 10:00:47 -08:00
Brad Fitzpatrick a41269e78e Reindex all dev-server blobs into memindex on restart.
Required some sync work (full syncs on start, blocking full syncs on
start, and also adding a dev-only hack to force a depedency from
search -> sync, to control the handler initialization order, otherwise
publish handlers would race with the sync handler and they'd create
new "blog" and "pics" permanodes and we'd end up with duplicates).
2012-11-07 22:40:17 +01:00
Brad Fitzpatrick e582f155ed Thumbnails for permanodes with members (folder) and camliContent to file images 2012-11-05 18:01:03 +01:00
Brad Fitzpatrick 6f82d343ef search: push thumbnail logic into its own function 2012-11-05 17:23:42 +01:00
Brad Fitzpatrick 9b7faaca07 Push server-side thumbnails down into DescribeRequest. Use node.png. 2012-11-05 16:32:56 +01:00
Brad Fitzpatrick 03b8cd143f Start of server-side icon support for recent permanodes list. 2012-11-05 15:48:13 +01:00
Brad Fitzpatrick 832b774025 search: add EdgesTo handler and tests 2012-11-05 15:09:34 +01:00
Brad Fitzpatrick f696007a14 index: implement EdgesTo
For finding back references in the graph.
2012-11-05 10:29:42 +01:00
Brad Fitzpatrick e783ad1717 Add another search handler test, for recent permanodes.
Change-Id: Iaf40cd94aba7b96c16fa1b04c2bfcebdfeea870e
2012-11-04 15:26:13 +01:00
Brad Fitzpatrick 305b4557b9 Improve search handler tests.
Change-Id: I5639447cc95f06d0773e7f15cb601d51c7dd5031
2012-11-04 13:59:19 +01:00
Brad Fitzpatrick 4b0d2841ee Add search.EdgesTo method to search interface. No implementation yet.
Change-Id: Ie3a9eb91e218e172b195d55cb9c17cb6c8f819ce
2012-11-03 16:08:37 +01:00
Brad Fitzpatrick 1466c77198 Add 'edgeback' key to index, for going backwards.
Change-Id: I43057a6fb96c3e8d9364002288d5c7b9ad2fd034
2012-11-03 14:25:48 +01:00
mpl 3e9aef409c search handler: documented the "attr" values when searching for a permanode
Change-Id: I607d1fe016078912faac9864630552cd2b496aa2
2012-10-24 17:26:46 +02:00
Brad Fitzpatrick 8c293e34b6 Per Go initialism style, rename Json to JSON 2012-07-28 15:42:56 -07:00
Brad Fitzpatrick 3b30cbd63f add TODO
Change-Id: Icd386f58b9004b78dd52bdaf32cca257d1593495
2012-05-13 13:30:42 -07:00
Brad Fitzpatrick 1b63c44b4e Update all os.ENOENT references to ErrNotExist. Mostly docs/dead code.
Change-Id: I2bb4d5a9d9c610e8dce2309335d06046dbb1e049
2012-05-13 12:06:21 -07:00
Brad Fitzpatrick 997f0db09e fix pkg/server tests
Change-Id: I2b34e61a128c15f20392b325a532b113a457f488
2012-03-29 16:22:05 -07:00
Brad Fitzpatrick 0714a463c9 Update from r60 to [almost] Go 1.
A lot is still broken, but most stuff at least compiles now.

The directory tree has been rearranged now too.  Go libraries are now
under "pkg".  Fully qualified, they are e.g. "camlistore.org/pkg/jsonsign".

The go tool cannot yet fetch from arbitrary domains, but discussion is
happening now on which mechanism to use to allow that.

For now, put the camlistore root under $GOPATH/src.  Typically $GOPATH
is $HOME, so Camlistore should be at $HOME/src/camlistore.org.

Then you can:

$ go build ./server/camlistored

... etc

The build.pl script is currently disabled.  It'll be resurrected at
some point, but with a very different role (helping create a fake
GOPATH and running the go build command, if things are installed at
the wrong place, and/or running fileembed generators).

Many things are certainly broken.

Many things are disabled.  (MySQL, all indexing, etc).

Many things need to be moved into
camlistore.org/third_party/{code.google.com,github.com} and updated
from their r60 to Go 1 versions, where applicable.

The GoMySQL stuff should be updated to use database/sql and the ziutek
library implementing database/sql/driver.

Help wanted.

Change-Id: If71217dc5c8f0e70dbe46e9504ca5131c6eeacde
2012-02-18 21:53:06 -08:00