Search with multiple tags

Hello Everyone,

I searched the community but I didn't find:

how can I setup a search with multiple tags ?

i.e. I need to have a tag field where people can insert one, two or three tags and get a search of articles which are linked to all the one, two or three tags?

Example: User can insert: "France", "Elections", "Declaration" and got article linked with those tags.

Help is very welcome !
thank you
Roberto

Hey buddy,

2 questions please

  • You need a client-side or server-side search
  • The tags are from a tagify.. You searched them in an Subtable , Array, JSON string?

Hello!

thank you for your reply.

Concerning your questions:

  1. I need a server side search

  2. I have a form with a Tagify field where user select the tags. I suppose it will pass the tags as array to server connect..

not necessarily, if just sent as "France Elections Declaration" as you would in a normal search you can split() on a space which will convert the string to an array of words.

You can then use conditional settings on query conditions to filter the query.

This does not allow for dynamic number of conditions as this can not be done but you could perhaps, say, add 10 conditions to the query but make them conditional on the array content being available

so if you split your search condition into an array called parameter you could use something like this

obviously you can add as many as you want, this becomes a max number but any missing parameters will cause the condition to be ignored.

Do you mean playing on the fact that people will not use more than 3 or 4 tags ? :wink:

Basically yes, just pick a maximum,after that they will be ignored.

1 Like

Thank you, Will give a try