1

Is there a way to search for complete xml/html tags in a Tridion RTF field ?.

For example : <span class="image1css">some content</span>

Is that possible to search for <span class=\"image1css\"> by entering a query in the CMS search box or via the core service?.

I have tried changing the SOLR config update request handler XmlUpdateRequestHandler to JsonUpdateRequestHandler, but after changing that directly in the config, indexing is not happening for a newly created component.

ref: http://www.findwise.com/blog/how-to-index-and-search-xml-content-in-solr/

3
  • r u using CMS search box to search or using core services to search the particular items which is having above span tag in RTF ? Jun 6, 2016 at 6:54
  • Yes @SDLBeginner. and need to search exact as "<span class=\"image1css\">"
    – swami
    Jun 6, 2016 at 14:51
  • Yes @SDLBeginner using CMS search box/ core service as well. is that possible in core service even if not possible in cms search box ?. . and to be clear need to search exact as "<span class=\"image1css\">"
    – swami
    Jun 6, 2016 at 14:57

2 Answers 2

1

You can search with the class name directly, like *image1css* and it will give you the desired result. This result will be specific since it is matching the name of the class. You don't need to give span tag etc in search.

3
  • Hi Vipin, thanks for your input. to be clear need to search exact as "<span class=\"image1css\">"
    – swami
    Jun 6, 2016 at 14:58
  • I understand your question, but I am suggesting you don't need to search with span tags etc. since you are searching with class name which is very specific. Theoretically even if you search with span with the class name, it has similar chances of getting more results as with the class name alone, since class name might be used in conjunction with the span tag in some other components as well. Jun 6, 2016 at 17:22
  • its specific and i have showed only a sample . the search can be "<div att-name="att-value>" .should be able to pass the tag as search input.
    – swami
    Jun 6, 2016 at 19:50
0

If you are using Core Services, then try the FullTextQueryas below: I used it for finding the components which is having below specific date in metadata field. You can change the ItemType to create SearchQuery

for reference follow this link How to use "FullTextQuery" for metadata date field of a component?

var Querydata = new SearchQueryData
{
FullTextQuery = " 2014-01-29T10\\:58\\:05* in Test_Date ",
ItemType = New ItemType[] {ItemType.Component}
};
ItendifiableObjectData[] compList = Client.GetSearchResult(queryData);

Your Answer

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

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