Card Database Issue

#1
OP TrampasLocasMilenario • 1 year ago

Hey, I don't know how this goes, I hope I'm talking in the right place. But the Card Database doesn't work, I mean, it "works", but since the Fuzzy Search was added the filters are broken and don't work, at least with the ones I use, but I assume it's something general.

For example, when looking for Normal Monsters by Release in OCG with Ascending order, I get Pendulums as the first cards. I assume that in Ascendant the first cards should be the oldest, as before, but the other way around doesn't work either. Even putting the order in Descending there are cards from 2001, 2003, 99, all mixed up.

#2
User avatar Premium
ygoprodeck • 1 year ago

Hey,

Let me check this out in the morning! There's some cleaning that needs to be done when a sort is applied me thanks.

In the meantime, please send me at least two example links if possible. It would help a lot!

#3
OP TrampasLocasMilenario • 1 year ago - (edited 1 year ago)

Links of the page with the filters on, you mean?

 

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=0

 

In this the first three cards to appear are the Limit Reverse Trap, The 13th Grave Normal Monster, and the D/D Savant Thomas Pendulum Monster. As seen in the link, it is ordered by the OCG date, The 13th Grave is one of the first cards in the game while a Pendulum appears next to it.

The Fuzzy Search doesn't change the link but it does the cards, if I activate it the first three are the Creature Swap, the Genesis Dragon and Ferret Flames.

 

 

https://ygoprodeck.com/card-database/?&type=Normal%20Monster&sort=ocg_date&sortorder=asc&num=100&offset=0

 

Adding the Normal Monster to the previous filters, the first ones that appear are Normal Pendulum Monsters, but the first ones are from 2015/2016, the last ones are so new that they haven't come out in TCG yet and then come Normal Monsters from different time points, without an apparent order.

 

I have tried using other filters, it seems that the main problem is with the filters by OCG and TCG Release, but I did not try all of them.

#4
User avatar Premium
ygoprodeck • 1 year ago

Ok I found the issue and I'm pushing a fix out. The tcg/ocg sort dates weren't actually doing anything as I forgot to add them to the code check for fuzzy searching. This has been fixed now and should be live in a few minutes.

#5
OP TrampasLocasMilenario • 1 year ago

I just looked and yes, it seems to work perfectly. Thank you.

#6
OP TrampasLocasMilenario • 1 year ago
ygoprodeck:

Ok I found the issue and I'm pushing a fix out. The tcg/ocg sort dates weren't actually doing anything as I forgot to add them to the code check for fuzzy searching. This has been fixed now and should be live in a few minutes.

Hey again! I have continued using the Database and have noticed something that may be another error.

 

Before, the cards were always arranged alphabetically and now it seems that they are not. I mean, before, I used the OCG Release filter and they were also sorted alphabetically automatically.

I didn't give importance to the fact that it didn't happen now, but these days the order of the cards has been changing, it seems randomly, so that if maybe I closed the computer on page 4 and turned it on again the next day the cards were different, there were cards from the previous pages and on those pages there were different cards.

 

The order by date is fine, but among the 20 cards that came out on the same date, they vary in order and it happens on all dates. I also notice that some cards are repeated, especially those that are at the bottom of the pages, when changing to the next one, sometimes they are repeated, mostly at the top of the new page.

 

Since I was going to comment on it, I have also checked some of the other filters too, it seems that the problem is constant in all of them.

I'm sorry if I bother a lot with this part of the page. Thanks in advance.

#7
User avatar Premium
ygoprodeck • 1 year ago

Hey there!

Don't be sorry! Feedback is good!

I'll look into the repeating cards as they shouldn't be happening. Can you give me an example URL of this happening with replication steps? I haven't seent it occur.

Regarding the order this is just elastic search ordering them by a score which can very (cards with same score aren't always the same order). 

However, I'm not sure why but this is a problem when no sort algorithm is set. It you want to sort by specific orders, the sort drop-down should do that. I understand that when you sort by date, cards with the same date have a different sort algorithm amongst themselves but again I'm not sure why this matters as long as the actual dates are still ordered. 

Although if you can give me a good use case as to why they shouldn't do this then I'm sure I can wrangle elastic search to always sort by specific parameters alongside their elastic search score (although I'll have to look into it).

One way of going back to the old sort is "fuzz search = off, sort by "Newest", sort order"asc". This gives you all cards ordered by the date they were added to the database. This was the default sorting order before we implement fuzzy searching to the database. Maybe that can help you for the moment?

 

#8
OP TrampasLocasMilenario • 1 year ago

Yes, np.

Page 1, last two cards Madjinn Gunn and Masaki The Legendary Swordman.

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=0

Page 2 begins with these same cards.

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=100

 

Page 3, Temple of Skulls, Takuhee and Leo Wizard are last.

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=200

Page 4, these 3 cards appear again at the top.

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=300

 

 

Regarding the order in which the cards appear, I don't know to what extent it can be problematic, but I will try to present an example of something that I think could happen.

Suppose there are 100 cards displayed on the screen and you order by OCG Release as is my case. If on the first registered date there are 50 cards, it doesn't matter how they are ordered, you will always see them all. But if there are 100 on the next date, then half will be displayed on the current page and the rest on the next. If I reload the page, and that causes the order to change again (it doesn't always happen, in my case it usually happens when I close and reopen the computer) then those 100 cards redistribute their visibility randomly. When I go from page 1 that I saw yesterday to page 2 today, it may be that among the first 50, of the 100 of the same date that were cut off by the visibility limit, there are cards that I already saw the other day on page 1 and yet I am skipping cards that are now visible on the previous page but were on this one yesterday. I don't know if I explained it well, or to what extent what I propose could happen.

 

 

I have tried those specifications and at least in my case they are not giving me the results I am looking for, because for example Pendulums and XYZ appear on the first page and my goal is to see the oldest cards, including those that were not released outside of Japan. But don't worry about me in that sense, the OCG filter works, it just baffles me that the order changes from time to time.

#9
User avatar Premium
ygoprodeck • 1 year ago

Finally got around to a fix for this. The fix should hopefully be deployed on the site later today!

#10
theultimatewizard2 • 1 year ago

Also make me a mod of this site. I got some users I want scraped off of here. Names: Henrystrick, BorgarTime, just to name a few.

#11
OP TrampasLocasMilenario • 1 year ago
theultimatewizard2:

Also make me a mod of this site. I got some users I want scraped off of here. Names: Henrystrick, BorgarTime, just to name a few.

 

The hell dude? Are you trying to pretend that you are me? And also, demanding to be a mod to kick people off the site is not a very good way to get it.

#12
User avatar Premium
ygoprodeck • 1 year ago
theultimatewizard2:

Also make me a mod of this site. I got some users I want scraped off of here. Names: Henrystrick, BorgarTime, just to name a few.

No, I'll just ban you instead Jobe. 

#13
User avatar Premium
ygoprodeck • 1 year ago

This change should be live now. You might have a look again and let me know if any cards repeat on subsequent pages again.

 

#14
OP TrampasLocasMilenario • 1 year ago

Hey, I couldn't check at the moment, I checked now and it seems to keep happening. I don't know if you'll ask me for links but I'll give you some just in case:

 

-On the second page, at the end, the cards from Ookazi to One Who Hunts Souls are repeated at the beginning of the third.

-On the third page, the same thing happens with the cards from Muse-A to Doriado, they are at the beginning of the fourth.

-The cards at the end of the fourth, are also repeated at the beginning of the fifth. From Dark Titan of Terror to technically Gorgon Egg, except for Dharma Cannon, La Jinn, Blue-Eyes Ultimate Dragon, and White Hole. And Emperor of the Land and Sea and Gorgon Egg are higher than before.

 

Second Page

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=100

Third page

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=200

Fourth Page

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=300

Fifth page

https://ygoprodeck.com/card-database/?&sort=ocg_date&sortorder=asc&num=100&offset=400

 

 

I'm not a programmer, so I can't help at all, sorry. But it seems that they are not punctual cards, but that it takes several cards in order and from the end.

#15
User avatar Premium
ygoprodeck • 1 year ago

Thanks for the feedback! I made further tweaks that adds double sorting that should fix it.

So when you sort by ocg_date is also sub-sorts by id.

Can you verify again for me please?

Thanks!

#16
OP TrampasLocasMilenario • 1 year ago

I have checked 6 pages and there is no duplicate card. Seems like it worked! Thanks for your dedication ^^