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

Reader Search on Manage: search errors maybe shouldn't be the same as other Calypso errors #13947

Closed
Labels
[Feature] Reader The reader site on Calypso. [Type] Enhancement

Comments

@gibrown
Copy link
Member

gibrown commented May 11, 2017

Using the same error box for a search error as when something like a post fails to save seems a bit odd to me. This one in particular is not great given that we are sticking the whole string into the error box.

screen shot 2017-05-11 at 11 29 53 am

props @designsimply

@gibrown gibrown added [Feature] Reader The reader site on Calypso. [Type] Bug labels May 11, 2017
@fraying
Copy link
Contributor

fraying commented May 11, 2017

I suggest breaking this into two issues.

  1. Limit search query size (no human needs that much text to search for a site). What should be the limit, @gibrown?

  2. Error display. (I know we were talking about this elsewhere yesterday, @jancavan.) I think the plan is to display errors inline, where the results would be, in a similar format.

@jancavan
Copy link
Contributor

Error display. (I know we were talking about this elsewhere yesterday, @jancavan.) I think the plan is to display errors inline, where the results would be, in a similar format.

Yes, this is correct.

@samouri mentioned there are 3 errors that could possibly occur:

  1. no results
  2. error retrieving results
  3. error retrieving page X of results

We have a PR that's in progress for (1): #13834

But I'm not sure when (2) #13834 (comment) and (3) happen?

@samouri
Copy link
Contributor

samouri commented May 11, 2017

But I'm not sure when (2) #13834 (comment) and (3) happen?

A couple reasons:

  1. user loses internet connection
  2. some error happens on the server
  3. too many characters in the search? we should make sure this one never happens

@gibrown
Copy link
Member Author

gibrown commented May 11, 2017

Limit search query size (no human needs that much text to search for a site). What should be the limit

On the API side we have typically been limiting it to 500 characters. There are some use cases where the user pastes in text that are good to support up to a point.

So maybe this issue is just imposing that limit with some fun messaging when searching since it looks like the other cases are getting covered. Agree that 1 and 2 should probably result in that same error bubble, but maybe we can say more about why?

@fraying
Copy link
Contributor

fraying commented May 11, 2017

500 seems overly generous to me

@fraying
Copy link
Contributor

fraying commented May 11, 2017

Would 100 characters be enough?

@gibrown
Copy link
Member Author

gibrown commented May 15, 2017

100 is probably not high enough for at least two use cases that seem interesting.

  1. German has an average word length of 11.66. Looking at our indexed German content, the 95th percentile of word count is 14 words (160 chars with no punctuation or spaces) (see this fun chart btw: http://www.ravi.io/language-word-lengths ). At 250 chars we can search for 99% of all German titles. (250 looks like it would be enough for 99% of titles in other langs too).

  2. Of the 66k active feeds since the beginning of the year, there are 209 (0.3%) where the url is longer than 100 chars. I'm actually surprised that the max I see is only 193 chars. The distribution (lots of urls close to the 200 limit with a hard cut off) makes me wonder if we are applying a max of 200 and are preventing users from actually following some urls (cc @blowery ).

The above is why I chose 500 at some point. Make it fairly unlikely for a user to ever encounter it even when pasting in some text. I think this will also get interesting if we go the path of saved searches.

@blowery
Copy link
Contributor

blowery commented May 15, 2017

The distribution (lots of urls close to the 200 limit with a hard cut off) makes me wonder if we are applying a max of 200 and are preventing users from actually following some urls (cc @blowery ).

Nothing I'm aware of... But I'll look into it.

@blowery
Copy link
Contributor

blowery commented May 19, 2017

Nothing I'm aware of... But I'll look into it.

AFAICT there's no limit.

@gibrown gibrown modified the milestones: Reader: Manage Following backlog, Reader: Manage Following Refresh May 19, 2017
blowery added a commit that referenced this issue May 19, 2017
…ce for feed searches (#14286)

* Reader: Truncate query in error notice for feed searches

Fixes #13947

* limit queries to 500 characters

* add a max length to the search
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment