Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searching feeds and (proposed) searching content are close but different #33

Open
sebsel opened this issue Nov 8, 2018 · 3 comments
Open

Comments

@sebsel
Copy link
Member

sebsel commented Nov 8, 2018

Hard to find a title on this one.

The spec mentions a POST for action=search&query=aaronparecki.com as a way to search feeds to subscribe on. Together is using this feature to find feeds to subscribe to.

The spec also mentions a POST for action=search&channel=x-uid-x&query=words, as a way to search within a channel for certain posts. They differ by the addition of channel, which is a very small difference, while they are very different endpoints.

I would argue that the first one is more closely related to action=preview&url=xx and that it could be better represented as action=preview&query=aaronparecki.com.

In a non-logged chat @aaronpk noted that the search actually is more a search than a preview, because in the example (below) 'percolator.today' is only found because 'aaronparecki.com' is in the response. So it's actually a search.

POST /microsub
Content-type: application/x-www-form-urlencoded

action=search&query=aaronparecki.com

Response

HTTP/1.1 200 Ok
Content-type: application/json


{
  "results": [
    {
      "type": "feed",
      "url": "https://aaronparecki.com/",
      "name": "Aaron Parecki",
      "photo": "https://aaronparecki.com/images/profile.jpg",
      "description": "Aaron Parecki's home page"
    },
    {
      "type": "feed",
      "url": "https://percolator.today/",
      "name": "Percolator",
      "photo": "https://percolator.today/images/cover.jpg",
      "description": "A Microcast by Aaron Parecki",
      "author": {
        "name": "Aaron Parecki",
        "url": "https://aaronparecki.com/",
        "photo": "https://aaronparecki.com/images/profile.jpg"
      }
    },
    { ... }
  ]
}
@swentel
Copy link

swentel commented Apr 12, 2019

Indigenous for Android allows search for feeds to based on URL and then subscribe to it.

I'd love to add a feature to just search for (a) post(s) that are already indexed by the server, either globally over all channels, or within a channel. This is partially described in https://indieweb.org/Microsub-spec#Searching_for_Content - but it would only allow me to implement this per channel while I think it might be useful to have this across all channels, because otherwise you need to first know which channel you need to go into to search for a certain post you'd like to see back again.

So a nicer distinction between the two would be easier for both server and client I think.

@EdwardHinkle
Copy link

I agree both search within a channel and searching global would be super useful. In features I'd like to add to Indigenous for iOS, is a search field that defaults to "within current channel", but then having an option to click and do the same search globally across all channels.

@swentel
Copy link

swentel commented Apr 12, 2019

Implemented in Drupal module and Indigenous. Works pretty neat already. Global would be nice. Let's see after I pushed if we hear any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants