Open vi opened 5 years ago
I am not too familiar with our most recent search implementation. However, I do know that the BitTorrent protocol doesn't really support file names, especially the names of single file torrents have to resemble the file name. So any sort of name management will have to come from Tribler's channel management/torrent metadata mechanism.
Regarding the metadata mechanism: @ichorid, we do store the custom torrent name and description in the MetadataStore, right? If so, it should just be a matter of tying that in to the search mechanism.
@qstokkink , you're completely right: bittorrent protocol does not permit changing the name of the torrent without touching the infohash, and we manage the stuff on our own in GigaChannels metadata entries.
So, if I understand the design correctly, the FtsIndex
table does not have the correct references to satisfy the $query
:
Not exactly. By design, GigaChan does not store any information about the contents of the torrent. The problem reported by @vi is due to the fact that the torrent "name"
field is the object's name on disk (filename for single files, dirname for directories). And we can only rename stuff at the GigaChan metadata level.
Aha, then #4683 is a completely separate issue.
Torrent creation process is a problem since you have several different cases/parameters that are not orthogonal to each other, and therefor hard to align:
GigaChan just gets the torrent name and puts it in into the metadata entry. So, the problem is not about GigaChan or the GUI, it is about our torrent-creating routine.
The proper way to fix it is by fixing the torrent creation process. As an ugly workaround, we can pass the torrent name that the user suggested through up to the moment we add the torrent to GigaChannel. However, the torrent name in the downloads will still be the same as the filename.
So, guys, how should we handle naming torrents created by user, knowing that the toplevel filename/dirname of the torrent must be the same as the user-entered name?
We can store the user-entered name in the metadata and display that value when rendering for the GUI.
Main thing about name and description is searchability. Filename should not be the only key to search for. Description is a good place to put various tags and keywords.
GUI concerns are a bit secondary, although it is not nice when you don't see why you get a particular search result.
@vi , at this moment, GigaChan is only able to search by metadata title name, that is the by default copied from the torrent name. We're not going to add content search in the foreseeable future, as we already had problems with it in Dispersy times, and it proved to add more noise than information to the search. The best practice with the most successful torrent trackers is to only index torrent title for the search, but have it descriptive and not bound to the torrent dir/name.
Then this torrent name (which becomes metadata title name) should be overridable by user.
Description should also be visible when clicking at search results (maybe after waiting for the file list).
Metadata title is editable in the personal channel table. You can change the category as well. Torrent's description is not served through GigaChannels. Though it should definitely be shown with the files.
Dec 6th version 7.4.0 still has a problem. Downloaded all Intel docs and tried to make a Torrent and it was created, but it wants to download the files, althought they are already there, so???
Tribler version/branch+revision:
v7.3.0-beta6
Operating system and version:
Linux
Steps to reproduce the behavior:
Expected behavior:
Download is named "vmcaffQvOv". Channel entry is also named "vmcaffQvOv". All of "vmcaffQvOv", "vlKqMqxxtYq" and "hello.txt" are findable using Tribler Search.
Description "vlKqMqxxtYq" is visible in detailed info bottom pane when entry is selected.
"m19Kasfq" may be or may not be searcheable.
Actual behavior:
Download is named "hello.txt". Channel entry is named "hello.txt". Neither "vlKqMqxxtYq" nor "vmcaffQvOv" is nowhere to be found in GUI. Neither words are searcheable by Triber, only "hello.txt".
Relevant log file output:
User home directory gains file
vmcaffQvOv.torrent
: