cancel
Showing results for 
Search instead for 
Did you mean: 

The right way to search in file data using API?

jecbm
Champ on-the-rise
Champ on-the-rise

I have been trying to find an authoritative post on how to search in content with no luck.

I need to find all nodes that contain a certain term in the content data and only in the content data.

I need to use wildcards as the term occurs inside an XML string.

I have attempted various queries based on the posts I have found, but I fail to find anything at all whenever I try to query inside the content.

TYPE:"cm:content" will provide a superset of the nodes that I'm interested in,. but if I attempt TYPE:"cm:content" and content:*myTerm* I find nothing. The myTerm value is copied directly from the XML data stored in a node, so it's not an issue of wrong case or misspelling.

Additionally, how do I restrict this search to SOLR?

1 REPLY 1

angelborroy
Community Manager Community Manager
Community Manager

Alfresco SOLR is indexing the content of the documents transforming the original format (XML in your case) to text. Since there is no transformation out-of-the-box to transform XML into text, you are getting no results.

You may try adding or developing a new transformer, after that your query would work.

Full text search reference is available in https://docs.alfresco.com/search-services/latest/using/

Hyland Developer Evangelist