cancel
Showing results for 
Search instead for 
Did you mean: 

How to search words inside documents: alternatives?

euleon
Champ in-the-making
Champ in-the-making
Hello everybody!


I've developed a layer for my company using RMI that connects to ALFRESCO and recover nodes and hence files from ALFRESCO.
Now, I'd like to search for content in the files (for example in a file.pdf search a word like "me").

I've been reading and reading for hours in the forum but I'm not satisfied with the information found, so I have to do several questions:


First of all, I'd like to present you the options I think I have (if anyone has more ideas or can correct some mistakes in my reasoning chain, is begged to do that).

1) I want to use the RMI connection in order to continue the with the proyect and the JCR layer, so Is it possible to search for content in files using the API of JCR??? I've found No examples of that.

2) Perhaps what I have to do is to use the ALFRESCO API? If so, Can I use it with my RMI connection? I've seen the example in the SDK called FirstFoundationClient, and I see that connects to an embebbed repository using RMI with this parameters:

# alfresco.rmi.services.port=50500
# alfresco.rmi.services.host=localhost


If I put there my own RMI configuration would I be able to work with RMI and the ALFRESCO API? The fact is that I think that Alfresco supports native calls to LUCENE, but in my opinion, I don't need to create an index for LUCENE because Alfresco does it by itself(I don't need to reinvet the wheel)… so maybe what I have to do is to connect to Alfresco LUCENE INDEX  and do there the queries?? the API for that??

3)Use LUCENE. But I think this is (as we say in Spain) kill flies with cannons because I'd have to build the index. in order to do that, I'd have to visit all DOCUMENTS in Alfresco Repository, create the Lucene Documents, create an Index and do the queries there…. This does not seem to be efficient….


Are these all possible solutions??

Any help will be appreciated!

Thanks.
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
The search service is not exposed over the RMI interfaces.

I personally dont know about the JSR interface so can't comment but there may be a remote binding.

There is a search service within alfresco that you need to get hold of, the prefered way to do this is to via web scripts, the next best option is web services.

And if you really want to you can put in your own remote spring bean into alfresco to provide your own RMI view of the search service.    Just follow the pattern already establised by remote-services.context.xml and delegate your interface handler to the search service.

mrogers
Star Contributor
Star Contributor
Administrator please remove the above spam and ban the user. :evil:
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.