Theoretically could I use ezsearch to also do a tag only search? Currently I've been using it by POST'ing to /search-results?q=search+entry so for a tag id just make the tags come out like so <a href="/search-results?q=@tag">@tag</a>
Which loads it and searches etc, but would there be a way to send a different config via the URL, so it maybe only looks at tags? when I eventually get tags searchable.
I think you may need to update the search code maybe write different end point.
As far as i know atm it will search whatever fields specified. I am guessing the results page uses a macro and that has the fields to search defined? So as it stands it could end up matching tag in actual content.
So in theory you could create new page and add macro to that and set field to tag field only and then search then it will only search on tag field.
I wonder if i could keep the same page but use a different macro depending on what the URL posts, like append +tagsearch and then the page detect this and like you say refine to only search tags.
Probably easier to create a new page though, but would be cleaner if i kept the same URL.
I realized if you simply put your tags object into searchFields="" then ezsearch does search them, so I just did a new macro on a new Tags page, pass it in the URL, and bingo search via tags.
Should ezSearch work with tags?
Hi guys simply put, can ezSearch search tags also in a document? Just the standard Umbraco ones nothing fancy, currently not seeing that it is.
Thanks
Kieron,
The tags are stored as csv list you will need to inject them in so search on them see https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/89730-multi-value-index-search-on-tag-field
some code that uses document writing event to inject in umbraco tag data so that it is then searchable.
Regards
Ismail
Ok, I will have a look into that. Thank you.
Theoretically could I use ezsearch to also do a tag only search? Currently I've been using it by POST'ing to
/search-results?q=search+entry
so for a tag id just make the tags come out like so<a href="/search-results?q=@tag">@tag</a>
Which loads it and searches etc, but would there be a way to send a different config via the URL, so it maybe only looks at tags? when I eventually get tags searchable.
Kieron,
I think you may need to update the search code maybe write different end point.
As far as i know atm it will search whatever fields specified. I am guessing the results page uses a macro and that has the fields to search defined? So as it stands it could end up matching tag in actual content.
So in theory you could create new page and add macro to that and set field to tag field only and then search then it will only search on tag field.
Regards
Ismail
Ah yeah sorry, i do use a macro;
I wonder if i could keep the same page but use a different macro depending on what the URL posts, like append
+tagsearch
and then the page detect this and like you say refine to only search tags.Probably easier to create a new page though, but would be cleaner if i kept the same URL.
Thank you
I realized if you simply put your tags object into
searchFields=""
then ezsearch does search them, so I just did a new macro on a new Tags page, pass it in the URL, and bingo search via tags.is working on a reply...