• Resolved stijndemulder

    (@stijndemulder)


    Hi,

    Is it possible to show stats of search term when and only when there are no results?

    So the user can see if the term is searched for a lot last week/month

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hi @stijndemulder ,

    Is this for the admin panel or the front end?

    Thread Starter stijndemulder

    (@stijndemulder)

    Hi,

    For the frontend.

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    There is no built-in way of doing that. But you can use the available filters or extend the shortcode that’s used for displaying the results to only include terms with no results.

    Thread Starter stijndemulder

    (@stijndemulder)

    OK, that’s good news but to be sure I’ll show you an example.

    I’m looking for “dr jones”
    – if there are results, normal results page is is shown
    – if no results he show the stats of “dr jones” from last week/month

    Ideally this can be some kind of “fuzzy” search so “dr jonez” or “jones” are also included.

    I’m aware that this requires some custom coding which is no problem but want to be sure the stats are only for that search term (or fuzzy)

    Thanks!

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hi @stijndemulder ,

    Got it. It sounds interesting and it can definitely be done. The database structure for WP Search Analytics is very simple – only 2 tables – so this can be achieved using a well crafted fuzzy SQL query.

    Let me know how I can help you with this.

    Thanks!

    Thread Starter stijndemulder

    (@stijndemulder)

    I suppose without fuzzyiness it’s quite standard?

    any good documentation on the fuzzy sql?

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hi @stijndemulder ,

    Sorry, I thought I replied this.

    I’ve used a few different PHP packages for different frameworks over time, but I never had to build the whole fuzzy functionality on my own.

    That being said, I think a good starting point is this question on SO with the accepted answer: https://stackoverflow.com/questions/55147321/php-sql-improving-search-feature-fuzzy-search

    Let me know if I can help with anything else on this thread.

    Thank you!

    Plugin Author Cornel Raiu

    (@cornelraiu-1)

    Hi,

    I will close this topic because there was no recent activity.
    If you still need help with this issue, please start a new one.

    Thank you,
    Cornel

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show stats when nothing found’ is closed to new replies.