I'm trying to get a list of items from Sitecore that match a custom tag field. This is from an external application so I need to use one of the APIs to do this.
I've tried using the Sitecore ItemService API like so:
However it's not working as I'd hoped it would.
I also read this SSE post and I don't think all of the content in it is correct:
Use the ItemService to perform a content search - as the list of fields you send in the parameters are not the list of fields to search in but are instead the fields you want to return in the response.
This is documented here by Sitecore:
So my question is how do I get a list of items which match a specific tag?
I've also tried using the Facet Option like so:
The above doesn't work for me because:
- I'm forced to enter a 'Term' as this is mandatory, I don't want this as I just want to get any items matching Tags.
- The search does not march partial terms, so isn't very useful even if I could pass a search term
- I can't seem to limit the search to just search a single field (Tag)
- A further complexity is that their may be more than one tag (Item ID) stored against an item and I suspect that the facet filter will only look for full matches, not partial matches.
I would just use the Solr API to do a search, but I don't think I can as Lucene is being used instead of Solr to my knowledge.
Any thoughts on the above would be very welcome.
I had some kind assistance from Vlad on slack and it's possible to pass * as a search term like so:
It also looks like there are some inconsistencies in the way the field filter works and the facets. Facets have to be lowercase and also require the '_' prefix for standard fields, where as the &fields= list doesn't. I'm still not able to filter on my custom field though or multiple ids.