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

Allow GET/HEAD requests for documents #4

Open
ericpugh opened this issue Mar 24, 2016 · 8 comments
Open

Allow GET/HEAD requests for documents #4

ericpugh opened this issue Mar 24, 2016 · 8 comments

Comments

@ericpugh
Copy link

Problem:
Applications using i14y might need to know the existence of a particular resource. For example, a document that was created, then deleted would have to guess whether or not a document exists for future requests. This leads to a lot of unhelpful errors.

Solution
Allow GET requests on a document, to test existence.

@joshuakfarrar
Copy link

Agreed. I ran into this when I was writing the WordPress plugin. The
question I had is, do we want to allow a client to request a document by ID
and actually receive it, potentially exposing i14y to them without
requiring them to use our service, or should the endpoint simply respond
with a status regarding the existence of the document, or some kind of
metadata?

On Thu, Mar 24, 2016 at 9:17 AM, Eric notifications@github.com wrote:

Problem:
Applications using i14y might need to know the existence of a particular
resource. For example, a document that was created, then deleted would have
to guess whether or not a document exists for future requests. This leads
to a lot of unhelpful errors.

Solution
Allow GET requests on a document, to test existence.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#4

@ericpugh
Copy link
Author

@sent1nel I'm not sure why you wouldn't want people to actually get the resource (maybe someone will build something that makes the service better,) but a couple of google searches and I realized that HEAD is probably what I'm looking for. (which would just return a 200 OK without the response body)
Here's a post about HEAD. Thoughts?

@ericpugh ericpugh changed the title Allow GET requests for documents Allow GET/HEAD requests for documents Mar 24, 2016
@dawnpm
Copy link
Contributor

dawnpm commented Mar 24, 2016

Hi @ericpugh, i14y is intended to index content for use within our service, which of course you're familiar with. Let's schedule some time on the phone to discuss your site and your needs - for instance are you going to be using direct commands in perpetuity? Will you be using Drupal or WordPress in the future? We totally agree that GET would be a good feature at some point; not sure when we'll be able to schedule it. Thanks.

@joshuakfarrar
Copy link

The issue with allowing GET requests is that we would, at that point, essentially be in the business of operating ElasticSearch as a Service, which isn't exactly what i14y was intended to be. That said, I think HEAD is a good feature; you aren't the first person to request it and we've needed it ourselves. We do, of course, offer the ability to search i14y separately from your configured, commercial engines via the v2 i14y search API (/api/v2/search/i14y?access_key={AFFILIATE_API_KEY}&query={YOUR_SEARCH_TERM}).

@ericpugh
Copy link
Author

IMO, HEAD would be the way to go. I'm working on porting the Drupal module to version 8, and don't even really need GET (I also haven't used the v2, yet) but was just looking for a way to verify the existence of a document.
thanks.

@dawnpm
Copy link
Contributor

dawnpm commented Mar 24, 2016

@ericpugh if you're working on a D8 port, let's definitely talk!

@ericpugh
Copy link
Author

@dawnpm, sounds good. should i just email you at support?

@dawnpm
Copy link
Contributor

dawnpm commented Mar 24, 2016

I'll ping you now, thanks!

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

No branches or pull requests

3 participants