Wildcard-Suche

Hallo,

gibt es eine (einfache) Möglichkeit, eine Wildcard-Suchfunktion in meinem Discourse zu aktivieren?

Ich betreibe lokal bei der Arbeit eine kleine, geschlossene Discourse-Instanz. Sie hat nur etwa 10 Nutzer, sodass wir nicht von der Postmenge einer großen Community sprechen.

Ich habe dieses Algolia-Plugin gesehen, das perfekt zu sein scheint. Das bedeutet jedoch, dass sie das Forum indexieren müssen, und wir können nicht zulassen, dass diese Daten das lokale Netzwerk verlassen.

Ich möchte Dinge wie „DE322X" finden, wenn ich nach „322X" suche :slight_smile:

3 „Gefällt mir“

There might be a couple of ways to do this using our Discourse Data Explorer Plugin.

  • You could run this simple query and then click the CSV button to download all posts. Then, you could search across the exported file using a different program.

    `SELECT id, raw from posts`
    

  • You could write a custom data explorer query to search for the keyword across all post content.

Using the Data Explorer here would ensure that your data doesn’t leave the local network.

3 „Gefällt mir“

Thanks, I will save this for later. Might come in handly :slight_smile:
But for this I need the whole team to be able to search stuff and would be a real hassle if everyone needed to dump a CSV file every time to find what they need :confused:

1 „Gefällt mir“

Sure, then writing a custom query and seeing the results in the UI would be the way to go. See What cool data explorer queries have you come up with? for inspiration on writing queries.

2 „Gefällt mir“

Auf einer ausreichend kleinen Website könnte so etwas funktionieren:

-- [params]
-- string :query

SELECT p.id AS post_id,
       p.user_id
FROM posts p
WHERE p.raw ~* :query
  AND p.deleted_at IS NULL

Man könnte aber vielleicht noch eine bestimmte Kategorie oder einen Datumsbereich hinzufügen, wenn man es weiter einschränken möchte.

Sobald es geschrieben ist, kann man es bestimmten Gruppen zur Verfügung stellen:


Ich weiß es zwar zu schätzen, dass es von der Suchleiste aus funktioniert, aber das ist idealerweise das, was der OP sucht. :slight_smile: Ich schiebe das mal in Feature, falls es dafür mehr Nachfrage gibt.