• Resolved jstneti

    (@jstneti)


    Hi,

    Is there any way of using Relevanssi to search through comments by meta?
    We have extended comments with custom meta and we are looking for a way to make a search form that would allow the user to search for multiple meta values.
    For example, the search form would have a dropdown of ‘rating’ (1-5) + input for ‘tags’ + dropdown for ‘year’ – which are all comment metas.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yes, there’s a way. You can use the relevanssi_hits_filter filter hook to go through the search results. After the keyword search gets you results, you can filter out unwanted results by the comment meta fields manually.

    If you want to be able to find comments purely by meta, without keywords involved, then Relevanssi is generally not the best tool for it – Relevanssi is a full-text search, and not really a structured search tool –?but it requires you to do the actual search logic. Here are some instructions.

    Thread Starter jstneti

    (@jstneti)

    Hi Mikko,

    Thanks for the quick answer and links ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Saerch comment by meta?’ is closed to new replies.