Closed Chocobozzz closed 6 years ago
Perfect ! Search is very important!
Accent insensitive search would be interesting as well, so that videos with "février" are displayed when you request "fevrier" (and the other way around).
Has anyone considered using a combination of yacy and elasticsearch as a decentralized search engine?
@Serkan-devel yacy and elasticsearch are two different search mechanisms with partially overlapping functionalities. I'm not sure what you suggest we do with them. Especially since they're added external dependencies.
yacy is a decentralized search engine and elastic can scope the search results better
I think you can avoid requiring such heavy dependencies by using the already included fuzzy match of PostgreSQL. (It’s used by pleroma btw and it’s more than enough for a local search) Related documentation: https://www.postgresql.org/docs/9.2/static/pgtrgm.html
Thanks @lanodan, I think we will use this :)
How I see the Advanced search work:
An example of how it'll work in a text-based format, by typing this command directly into the search bar:
1..4 cats "green" -"yellow" -dog daterange:2455332-2455334 language:fr license:cc tag:cat tag:paw -tag:dog -intitle:*bad indescription:good
explanaition:
This is only the text-based way of searching, a GUI one is better to have as well, for less technical people.
As a reference we can see how Search Engine Optimization (SEO) is doing it, we don't necessarily have to re-coin the wheel :) Another good resource here. Here's how google is doing it, but other Search Engines do it too, for example in duckduckgo you can refine search results with the same commands, like: cat -dogs insite:ututu.com "go" so it looks like a "standard" and I believe we should not deviate from it.
I think you should drop the in
on intitle
and indescription
so it’s an actual word and it’s more consistent.
@Zig-03 Thanks, but a search string is a little bit too complicated for now. I tried to make something we can extend easily based on query parameters: https://github.com/Chocobozzz/PeerTube/pull/829. And nothing prevents in the future to create your search parser, as I agree this is a very powerful and flexible way to query data.
Will advanced search also fetch data from other peertube instances?
@Serkan-devel No, only local videos and videos from instances followed by your admin (for now). See https://github.com/Chocobozzz/PeerTube/issues/824 for search on the entire fediverse
I reckon this could be made to work well with Postgres' full text search capabilities. Perhaps there could be a lightweight table that contains tsvector
s of tokenized video titles, tags, (transcriptions ultimately?), and references to video locations that may span multiple hosts. The tricky part would be replicating this table between hosts, but if that could be achieved then there would be host-independent search.
Is there a reason why there is no global search? I mean at least with peered videos.
@lanodan maybe the instances need to be updated for that. This has been freshly commited
That would be weird, I mean the local instance already got the metadata of the video that is given with ActivityPub, right?
EDIT: Nevermind, I must have misunderstood the #824 issue…
@lanodan I don't have an instance, so I'm not shure
Is there a reason why there is no global search? I mean at least with peered videos.
I don't understand, the search occurs on all videos of instances followed by your admin (so peered videos too).
For now, we search on the video name, account username and account host fields (substring search).
It could be interesting to search on: