Exact names first in searches

Started by Azma, Jul 15, 2014, 09:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Azma

I think it would be nice if, when you search for an item/monster, the one with the exact name you searched for were first in the list. For instance, right now, when searching for Shield, lots of shields are before Shield [ 0 ]. Worst case, what you precisely searched for might end up not even being on the first page of the search results.

So essentially, if I search for "Shield", the results would be as follows:

1. Shield [ 0 ] (spaces because the forum makes a list out of a zero between brackets)
2. Shield [1]
3. All other shields in alphabetical order.

yC

The slot is not part of the name, if you want to search for slot specifically you could use the search form option for that.  So everything with "shield" matches your search.

Azma

#2
I know that. But the number of slots is irrelevant. I'm not sure you've understood my message. I know they all match. I'm asking if -exact- matches, for example Shield, could come first, instead of being mixed up with all the other non-exact matches, for instance Valkyrja's Shield.

Here is a good example of a search that would benefit from having exact matches first: "wand"

http://ratemyserver.net/index.php?iname=wand&page=item_db&quick=1&isearch=Search

You searched for Wand (IDs 1604, 1605 and 1606) by saying its exact name, but all sorts of wands are before it, and whether you were looking at who drops the wand or where you can buy it, despite giving the exact name of the item you wanted, you need to go to page two to see it.

Bue

You'll need a hash index on the item names to make the searches efficient.

Saw the date after posting. I blame Tripper for linking this section!

Triper


Azma

Quote from: Bue on Sep 07, 2014, 07:02 PM
You'll need a hash index on the item names to make the searches efficient.

Saw the date after posting. I blame Tripper for linking this section!

Whoa, and here I thought I at least knew some about programming. I have no idea what you're talking about. :o