Permalink
Browse files

Update for "doc" changes in PGXN::API v0.6.6.

* Rename the "path" key in doc results to "doc".
* Add the "doc" key to extension results.
  • Loading branch information...
theory committed Mar 29, 2011
1 parent 43cb4ab commit 3314c6839c881c4f0c1a040634730e96e8e21c31
Showing with 24 additions and 9 deletions.
  1. +3 −0 Changes
  2. +11 −5 lib/PGXN/API/Searcher.pm
  3. +10 −4 t/base.t
View
@@ -1,6 +1,9 @@
Revision history for Perl extension PGXN-API-Searcher.
0.6.2
+ - Updated for "doc" changes in PGXN::API v0.6.6:
+ + The "path" key in doc results has been renamed "doc".
+ + The "doc" key has been added to extension results.
0.6.1 2011-03-28T03:07:13
- The index to query is no longer specified as the first argument to
View
@@ -37,9 +37,9 @@ my %highlightable = (
);
my %fields = (
- doc => [qw(title abstract dist version path date user user_name)],
+ doc => [qw(title abstract dist version doc date user user_name)],
dist => [qw(dist version abstract date user user_name)],
- extension => [qw(extension abstract dist version date user user_name)],
+ extension => [qw(extension abstract dist version doc date user user_name)],
user => [qw(user name uri)],
tag => [qw(tag)],
);
@@ -251,7 +251,7 @@ The name of the distribution in which the document is found.
The version of the distribution in which the document is found.
-=item path
+=item doc
The path to the document within the distribution.
@@ -320,8 +320,8 @@ The name of the extension.
=item excerpt
-An excerpt from the extension with the search keywords highlighted in C<
-<<strong>> > tags.
+An excerpt from the extension with the search keywords highlighted in
+C<<<strong>> > tags.
=item abstract
@@ -335,6 +335,12 @@ The name of the distribution in which the extension is found.
The version of the distribution in which the extension is found.
+=item doc
+
+The path to the extension's documentation within the distribution. This is the
+same format as used for the "doc" key in doc results, and as used by the "doc"
+URI template.
+
=item date
The distribution date.
View
@@ -77,7 +77,7 @@ INDEX: {
[ body => $ftih ],
[ dist => $fti ],
[ version => $stored ],
- [ path => $stored ],
+ [ doc => $stored ],
[ date => $stored ],
[ user => $stored ],
[ user_name => $stored ],
@@ -98,6 +98,7 @@ INDEX: {
[ key => $indexed ],
[ extension => $fti ],
[ abstract => $ftih ],
+ [ doc => $stored ],
[ dist => $stored ],
[ version => $stored ],
[ date => $stored ],
@@ -151,6 +152,7 @@ for my $doc (
abstract => 'A key/value pair data type',
date => '2010-10-18T15:24:21Z',
dist => 'pair',
+ doc => 'doc/pair',
extension => 'pair',
key => 'pair',
user => 'theory',
@@ -183,7 +185,7 @@ for my $doc (
date => '2010-10-18T15:24:21Z',
dist => 'pair',
key => 'pair/doc/pair',
- path => 'doc/pair',
+ doc => 'doc/pair',
title => 'pair 0.1.0',
user => 'theory',
user_name => 'David E. Wheeler',
@@ -209,6 +211,7 @@ for my $doc (
abstract => 'A semantic version data type',
date => '2011-03-21T23:49:28Z',
dist => 'semver',
+ doc => 'docs/semver',
extension => 'semver',
key => 'semver',
user => 'roger',
@@ -220,6 +223,7 @@ for my $doc (
abstract => 'A less than semantic version data type (scary)',
date => '2011-03-21T23:49:28Z',
dist => 'semver',
+ doc => 'docs/perver',
extension => 'perver',
key => 'perver',
user => 'roger',
@@ -334,7 +338,7 @@ is_deeply $res, {
date => "2010-10-18T15:24:21Z",
dist => "pair",
excerpt => "The ordered pair data type is <strong>nifty</strong>, I tell ya!",
- path => "doc/pair",
+ doc => "doc/pair",
score => "0.015",
title => "pair 0.1.0",
user => "theory",
@@ -358,7 +362,7 @@ is_deeply $res, {
date => "2010-10-18T15:24:21Z",
dist => "pair",
excerpt => "The ordered pair data type is <strong>nifty</strong>, I tell ya!",
- path => "doc/pair",
+ doc => "doc/pair",
score => "0.015",
title => "pair 0.1.0",
user => "theory",
@@ -381,6 +385,7 @@ is_deeply $res, {
abstract => "A semantic version data type",
date => "2011-03-21T23:49:28Z",
dist => "semver",
+ doc => 'docs/semver',
excerpt => "A <strong>semantic</strong> version data type",
extension => "semver",
score => "0.140",
@@ -392,6 +397,7 @@ is_deeply $res, {
abstract => "A less than semantic version data type (scary)",
date => "2011-03-21T23:49:28Z",
dist => "semver",
+ doc => 'docs/perver',
excerpt => "A less than <strong>semantic</strong> version data type (scary)",
extension => "perver",
score => "0.100",

0 comments on commit 3314c68

Please sign in to comment.