Jump to content

Search 'cite' within comments - problems


NikNak
 Share

Recommended Posts

Hi all 

I am trying to search for text with a comment including the 'cite' field.

This code works to search within the main text of the comment:
$items = FieldtypeComments::findComments("comments", "data~=$q");

This code works to search an exact match in the cite field:
$items = FieldtypeComments::findComments("comments", "data=$q");

But this code will not work to search within the cite field:
$items = FieldtypeComments::findComments("comments", "data~=$q");

Currently I can only get a matching search for 'Joe Bloggs' but not 'Joe' or 'Bloggs'.

I have also used another method using $fields->get('comments') - but have the same issue.

Any thoughts? Have I found a bug?
I was also wondering how you would combine searching within more than one field in the comments.

Processwire:  3.0.159 dev.   comments 1.0.8  (Latest version from dev branch at time of posting)

Many thanks
Nik

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...