أتساءل عما إذا كان هناك طريقة لإعداد بحث حسب نوع الملف للمرفقات داخل المنشورات. لا أحتاج إلى المحتوى، لكن لو أراد شخص ما تصفح المنشورات التي تحتوي على امتداد معين لنوع ملف المرفق في المنشور، لكان ذلك مفيدًا. البحث عن الامتداد فقط يؤدي إلى العديد من النتائج الإيجابية الخاطئة لأن هناك الكثير من الأكواد على موقعنا.
4 إعجابات
هل جربت filetypes:csv؟
تمت إضافة الدعم لهذا منذ بضع سنوات بواسطة @dmacjam
master ← dmacjam:search_posts_by_filetype
merged 03:55PM - 31 Jul 17 UTC
**User story:** As a user, I want to filter posts in Advanced search which conta… ins links to files or uploads, e.g. `filetype:pdf` lists all posts with pdf files.
This is a power user feature as UI for inputting file extensions will make the advanced search page more complicated.
_Related discussion:_ https://meta.discourse.org/t/feature-request-add-includes-image-to-the-advanced-search-options/54103
_Related pull request with search for posts with images:_ https://github.com/discourse/discourse/pull/4917
The implementation idea is to extract file extension and persist it into database for both url links and uploads. Therefore, new columns with indices were added to `TopicLinks` and `Uploads`. Then searching by filetypes at the backend is a combination of searching these columns (distinct search)
7 إعجابات
لم أفعل، سأقوم بالتحقق من الأمر، شكرًا لك!
jomaxro
(Joshua Rosenfeld)
تم إغلاقه في
16 يوليو 2019، 10:00م
4
تم إغلاق هذا الموضوع تلقائيًا بعد 44 ساعة. لم يعد مسموحًا بالردود الجديدة.