Author Topic: Search results order  (Read 11691 times)

0 Members and 1 Guest are viewing this topic.

Offline asminokk

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-1
Search results order
« on: 06 November, 2018, 14:19:33 »
We have NAS with PtokaX hub, DC client on it and hundreds of other clients in passive mode in our network. Disks are too slow to serve all clients so we made a cache with SSD to keep popular files on it. All works fine when cashe's nick is the first in search results. It seems that the first connected client is the first in results. So we reconnect NAS every time when cache is reconnected to hub.

How can we make nick of cache to be the first in results independently of connecting order?
Maybe it can be made with script or we can edit some source code to "hardcode" search results order?
I tried but didnt find where search results in source code could be corrected.

PtokaX forum

Search results order
« on: 06 November, 2018, 14:19:33 »

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 744
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: Search results order
« Reply #1 on: 11 March, 2019, 11:16:28 »
Late reply but: it cannot be done in Lua as you cannot influence the order clients send their results back to the hub after receiving a search string. So if a search is done every user sends back the results to the hub (in passive mode) separately. Lua interface can only do anything after the search response reached the hub.The only option could be "holding back" every search result except for those coming from a particular nick for a few seconds.  So if a search is performed the results from the nick are not held back, making them appear first on the list.If you still need this I can do this delay but it's just an idea and not sure if it will work, but easy to code nonetheless.
Everything could have been anything else and it would have just as much meaning.

PtokaX forum

Re: Search results order
« Reply #1 on: 11 March, 2019, 11:16:28 »