PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
21.63k stars 1.29k forks source link

Concept: Universal search for people / recordings / cohorts / events / groups #7963

Open macobo opened 2 years ago

macobo commented 2 years ago

Is your feature request related to a problem?

This issue tries to outline a solution to many disparate issues with the meta problem being:

Describe the solution you'd like

A insights-like search functionality for everything qualitative: people / recordings / cohorts / events / groups.

Similar to insights, this would take the form of a sentence (containing various dropdowns), like:

Show me [People | Group Type G | Cohorts | Recordings | Events from people | Recordings from people] who [Have property | Belong to COHORT | Have done Y]

Where user can easily switch between what's being shown via dropdown or via selecting a new tab from side navigation.

There are also context-specific actions, for example:

Viewing a cohort then becomes an action of selecting the appropriate filter and showing the same results as elsewhere. Note that with this approach, creating cohorts of groups would also become possible.

We could link to this view from any person modal with a static filter being set (e.g. has completed funnel step Y).

There could also be a time filter for various views.

This view could also power additional analytics - e.g. show correlated properties for people/cohort/group that was selected, show who might be slipping away, etc.

Describe alternatives you've considered

Universal search experience like one outlined in https://www.figma.com/file/NHPA2hVWwaKp4eTGWdigs9/?node-id=128%3A437. However this is too 'hard' to solve as an initial step.

Additional context

Grab bag of related issues:

cc @clarkus @EDsCODE @paolodamico @mariusandra @rcmarron

Thank you for your feature request – we love each and every one!

rcmarron commented 2 years ago

This is great! I really like the concept.

It feels so powerful/intuitive to write one query and then be able to quickly flip between the type of result. I'm imagining a "query builder" on the top, and then tabs below that let you quickly change what's being searched for. The flow of:

1) "I wonder which organizations have used feature Y" 2) Search for that event and change the tab to organizations 3) "Interesting CompanyXYZ is using it, I wonder who" 4) Flip to persons + add an organization filter for CompanyXYZ 5) See the persons 6) "I wonder how/why they're using it" 7) Click recordings + see the recordings

It would be pretty clunky/impossible to explore your data in that way with today's interface.

A couple of thoughts/questions:

clarkus commented 2 years ago

This is an interesting idea and something that could be extremely powerful for users. I'm game to work on some concepts once we're ready to pick this up.

macobo commented 2 years ago

I don't see how cohorts would fit in the universal search. It seems like you could create a cohort from a search, but I don't know how you would search for cohorts with it. Might be missing something.

Good question. So this view would be what is shown when you "open" a cohort - which you also should be able to do via the filtering capabilities. You can also create/edit cohort definitions on the same view.

Customizable columns for properties on all results would be amazing

Related: https://github.com/PostHog/posthog/issues/8011 and https://github.com/PostHog/posthog/issues/7432

We would need to handle some searching that isn't universal. For example, recordings have duration and people don't really have a clear 'timestamp' etc.

Yup! Basically filtering subtly changes depending on the view and will need to be specced out separately if this goes into work.

mariusandra commented 2 years ago

Customizable columns for properties on all results would be amazing

Related, multiple formulas on tables have also been requested: https://github.com/PostHog/posthog/issues/11913

lsmith77 commented 2 years ago

Would this also include searching by properties? Currently the universal search f.e. only seems to support search by id for groups.