Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Minor search issues #37

Closed
eksopl opened this issue Jan 8, 2012 · 12 comments
Closed

Minor search issues #37

eksopl opened this issue Jan 8, 2012 · 12 comments
Labels

Comments

@eksopl
Copy link

eksopl commented Jan 8, 2012

These are minor issues, they're not even bugs, I'm just putting them here in case you want to mimic Fuuka's search behavior as much as possible.

Because - is a special character, a word with - in won't be able to be searched for if you input it like that. For example, Anon-san, or Akiha-sama. The other special characters, |, + and " don't really pose that much of an issue because usually people don't mistakenly try to search for words with those characters in them while expecting results.

So, as a courtesy to the user, Fuuka, in the _sphinx_escape function (which is used under the same circumstances as your HalfEscapeString method), turns an expression like something-something into "something\-something" (which is technically returns the same results as "something something" because - isn't indexed and is counted as a word boundary character, but I'm still including the escaped - for the sake of correction), so you get the expected results. In that way, the - character is only treated as "exclude the following word or quoted expression from the search results" when it's preceded by at least one space. This matches Google's behavior:
https://www.google.com/search?q=akiha-sama
https://www.google.com/search?q=akiha%20-sama

Example:
http://oldarchive.foolz.us/jp/?task=search&ghost=&search_text=akiha-sama (autocorrected by Fuuka)
http://oldarchive.foolz.us/jp/?task=search&ghost=&search_text=%22akiha%20sama%22 (equivalent search)

http://archive.foolz.us/jp/search/text/akiha-sama/ (broken)
http://archive.foolz.us/jp/search/text/%22akiha%20sama%22/ (equivalent search)

These are the Perl regexes that perform the replacement above (you need the first one so you won't wreck someone who searches by "akiha-sama", otherwise the second one would turn it into ""akiha-sama""):

    $query=~ s/\"([^\s]+)-([^\s]*)\"/$1-$2/g;
    $query=~ s/([^\s]+)-([^\s]*)/"$1\\-$2"/g;

Another thing that I noticed is that making a search with invalid syntax returns a 404. Ideally, it should return an error message so someone who's unaware of search syntax has a chance to figure it out and correct their mistake, instead of being throughly confused. Examples: http://archive.foolz.us/jp/search/text/-/ http://oldarchive.foolz.us/jp/?task=search&ghost=&search_text=-

http://archive.foolz.us/jp/search/text/%22something/
http://oldarchive.foolz.us/jp/?task=search&ghost=&search_text=%22something

@woxxy
Copy link
Member

woxxy commented Jan 15, 2012

Now the fixed version is live. Added errors where necessary too.

@woxxy woxxy closed this as completed Jan 15, 2012
@nstepien
Copy link
Contributor

Will Spinx ever let me search for "4chan x"?

@woxxy woxxy reopened this Jan 15, 2012
@woxxy
Copy link
Member

woxxy commented Jan 15, 2012

I'll have to try with single letter indexing. I have no idea if it's feasible as in performance or if it works at all then.

In these days we're working on implementing internal boards and automatic creation of tables with Sphinx configurations, so I'll have a chance to try.

@nstepien
Copy link
Contributor

Yay!

@woxxy
Copy link
Member

woxxy commented Jan 29, 2012

Moving to #57

@woxxy woxxy closed this as completed Jan 29, 2012
@woxxy
Copy link
Member

woxxy commented Mar 11, 2012

@MayhemYDG Confirmed that sphinx can work with one letter and we will do the reindexing on the next update of FFuuka live. That should take another week since we made lots of updates.

Example:
http://archive3.foolz.us/a/search/text/%224chan%20x%22/order/desc/

@nstepien
Copy link
Contributor

Suweet. Thanks.

Also, get rid of that shitty sub-menu navigation.

@fit-bear
Copy link

I liked the shitty sub menu navigation. I think the new one uses too dark green and black sub menu, difficult to read and ugly.

@nstepien
Copy link
Contributor

I largely prefer it as it is right now.

A sub-menu? Really?
Soon enough it will look like that:

menu
  - 4chan
    - weeaboo
      - /a/
      - /jp/
      - /m/
      - /u/
    - gaymz
      - /tg/
      - /v/
      - /vg/
  - foolz
    - /foolz/

This is terrible UX. No one likes needless complications.
This isn't deviantArt, keep it simple.

The colors are worse too.

@woxxy
Copy link
Member

woxxy commented Mar 16, 2012

Links composed by a single 13px letter is terrible UX too, but you can still scroll up to find them.

I am particularly annoyed by small links because I am always on touch devices unless I am coding. The dropdown feels really slick then. I tried various options, but all suffered from being unobvious for the user. Having dropdown and old links is best of both worlds.

And there's all kinds of things that need to be fixed to work on touchscreens, and I'll get on that hopefully before the release of this version.

@nstepien
Copy link
Contributor

Links composed by a single 13px letter is terrible UX

No it's not. Not at all.

touchscreen

http://caniuse.com/css-mediaqueries
Don't bring touchscreen UI in desktop UI.

If you're concerned about a too small hitbox, use a bit of CSS.

@fit-bear
Copy link

I think this for example very hard to read http://oi42.tinypic.com/el49rl.jpg .and the dark green also makes it worse.A lso, white on dark is ugly. Just my opinions, but I think many people also think like this.

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

No branches or pull requests

4 participants