cancel
Showing results for 
Search instead for 
Did you mean: 

How do I search within a file in Alfresco using webservices?

jiehuanli
Champ in-the-making
Champ in-the-making
This is really urgent, I would appreciate it very much if somebody can help.

I added several .html files as content to alfresco, and I want to search on the full body of the html files to find key words so that I can implement the website's search function. I tried a code very similar to the webservice example 2, but no results were returned even though I know the files that I added contain the keyword "virginia" in them. Any ideas?
I thought when I add the conent to the repository, html transformer would kick in, and the entire file content would be indexed in lucene, was I wrong?

The query in my code is like this:

Query query = new Query(QueryLanguageEnum.lucene, "TEXT:virginia*");

Thanks.

Jiehuan Li
2 REPLIES 2

davidc
Star Contributor
Star Contributor
HTML content is indexed.  Are you able to start the Alfresco Web Client against your Repository?  If so, can you verify that your HTML files are returned when searching for virginia.

You may also want to check that you're searching against the correct store.

jiehuanli
Champ in-the-making
Champ in-the-making
It turns out there was something wrong with my installation of alfresco.  I installed a fresh copy and then the problem is gone.  Thanks for your reply, it helped in pointing me to the right direction.