searching extensions does not work

10 views
Skip to first unread message

Tomas Vondra

unread,
Mar 26, 2012, 7:21:30 PM3/26/12
to pgxn-...@googlegroups.com
Hi,

I've been struggling with searching for extensions on PGXN and it seems
broken. For example several my extensions contain "distinct" in the
description, but searching for "distinct" does not return them in the
results. It returns just omnipitr and pgTAP (for documentation) or
nothing (for extensions / distributions).

The pgxn client behaves exactly like the website (but that's expected
because it uses the same API).


Tomas

David E. Wheeler

unread,
Mar 26, 2012, 8:28:35 PM3/26/12
to pgxn-...@googlegroups.com
On Mar 26, 2012, at 4:21 PM, Tomas Vondra wrote:

> I’ve been struggling with searching for extensions on PGXN and it seems
> broken. For example several my extensions contain "distinct" in the
> description, but searching for "distinct" does not return them in the
> results. It returns just omnipitr and pgTAP (for documentation) or
> nothing (for extensions / distributions).

If they don’t have documentation (or the indexer could not find it or parse it) then they likely won’t have that information in the default search, which is the documentation search.

Here’s the search in docs, which is the default:

http://pgxn.org/search?q=distinct&in=docs

Finds OmniPITR and pgTAP only, as you see. If you search extensions, it gets worse:

http://pgxn.org/search?q=distinct&in=extensions

Hrm. Nothing for any of the other options, either. It should at least work for tags:

http://pgxn.org/search?q=distinct&in=tags

No results, but there are tags:

http://pgxn.org/tag/distinct/

This is annoying. I will have to find some tuits to look into that.

Overall, the best way to get search results for one’s own extensions is to provide docs. But even without docs, clearly we could be doing better than this. :-(

> The pgxn client behaves exactly like the website (but that’s expected
> because it uses the same API).

Yeah.

Best,

David

Tomas Vondra

unread,
Mar 27, 2012, 5:54:25 PM3/27/12
to pgxn-...@googlegroups.com, David E. Wheeler
On 27.3.2012 02:28, David E. Wheeler wrote:
>
> Overall, the best way to get search results for one�s own extensions is to provide docs. But even without docs, clearly we could be doing better than this. :-(

Yeah, but I thought I've provided basic docs - all the extensions have a
README (usually a markdown although missing .md at the end). For example
this

http://pgxn.org/dist/adaptive_estimator/

contains a README with 'distinct' in the title, yet it's not found :-(

The howto is a bit blunt in this area, so I'm wondering why the README
was not indexed ...

Tomas

David E. Wheeler

unread,
Mar 27, 2012, 11:22:39 PM3/27/12
to Tomas Vondra, pgxn-...@googlegroups.com
On Mar 27, 2012, at 2:54 PM, Tomas Vondra wrote:

> On 27.3.2012 02:28, David E. Wheeler wrote:
>>

>> Overall, the best way to get search results for one’s own extensions is to provide docs. But even without docs, clearly we could be doing better than this. :-(


>
> Yeah, but I thought I've provided basic docs - all the extensions have a
> README (usually a markdown although missing .md at the end). For example
> this
>
> http://pgxn.org/dist/adaptive_estimator/
>
> contains a README with 'distinct' in the title, yet it's not found :-(

READMEs are not by default documentation in PGXN. It prefers a separate document. For example, semver has a README.md:

http://pgxn.org/dist/semver/

Which has basics, installation instructions, etc. And a separate doc/semver.mmd file that has the actual documentation:

http://pgxn.org/dist/semver/doc/semver.html

So the README is indexed for "distribution" searches, and the documentation is indexed for "documentation" searches. But if there were no docs other than the README, nothing would be added to the documentation search.

> The howto is a bit blunt in this area, so I'm wondering why the README
> was not indexed ...

A couple of notes:

1. I just realized why your README is not included in the documentation index: your distribution is not stable. It's testing. Only stable distributions are indexed. This has been complained about before; I added an issue that the indexer should perhaps index a non-stable distribution if there is not (yet) a stable release of the distribution.

https://github.com/pgxn/pgxn-api/issues/2

Just change the release_status to "stable" and increment your distribution version and upload again to get things working mo betta. Assuming you're ready to consider it a stable release, of course.

2. In a stable release, if you want your README to be indexed as the documentation, you can force it by adding it under the "docfile" key in the "provides" section, like so:

"provides": {
"adaptive_estimator": {
"file": "adaptive_counter--1.0.sql",
"docfile": "README",
"version": "1.0.0"
}
},

3. I plan to change the rules for the documentation index such that, if there is no separate documentation file, and there is only one extension in the distribution, and there is a README, it will assume that the README is also the documentation and add it to the documentation index. IOW, you wouldn't have to do #2. Personally, I always list the documentation file for each extension, though.

#3 came out of a discussion we had here a few months ago, but it looks like I never got ’round to adding an issue. Oops, Now I have:

https://github.com/pgxn/pgxn-api/issues/12

Thanks for the note.

Best,

David

Reply all
Reply to author
Forward
0 new messages