4

I am using SXA version 1.8.1. I created a scope item and using that in search. I need to list all the items of templates A and B under a given location. Is it possible to have a query to include multiple templates? My query returns result if I have one template, but how do I include multiple templates?

Now my query is something like this

location:{E59F0AFE-FE69-4393-9955-23B48D28FB76};+template:{2BE81A84-A619-46A8-B5B4-BEB7D2D7CC40}

How can I include one more template id?

1 Answer 1

4

You can just add the extra template Id in the same way as the first. E.g.:

location:{a4d6582e-dfb8-4492-95fe-c70b6969cbb9};template:{ad0e07c0-d08d-49df-9cdd-86ac2cd49be4};template:{324733cf-afec-4281-9a18-03b6cfc4e535}

But remove the + And modifier on the template filters and add it to the location filters like this:

+location:{a4d6582e-dfb8-4492-95fe-c70b6969cbb9};template:{ad0e07c0-d08d-49df-9cdd-86ac2cd49be4};template:{324733cf-afec-4281-9a18-03b6cfc4e535}

Doing that makes the location a must have and the template filters OR's

1
  • Thank you for answer !! May 23, 2019 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.