cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced Search using custom type retrieves no results

ardamose123
Champ on-the-rise
Champ on-the-rise
I have an Alfresco 4.2.c instance running in a WebLogic server. Solr is <em>not</em> being used in this Alfresco instance; just Lucene.

I developed a custom model that defines only one type, which is a sub-type of
cm:content
. I followed all tutorials I could find to implement it… and it works, except for the problem I describe below. I can see and update all the properties in the file details in Alfresco Share.

Also, I developed a web service that uploads a file using the custom type mentioned through OpenCMIS (by means of Apache Chemistry). This web service can be used to upload, download, get metadata, and delete files using the custom type I mentioned earlier.

My problem lies in Alfresco Share's Advanced Search:
<ul>
<li>Advanced search, looking in the custom type, search for custom content type metadata: 0 results, not expected.
<li>Advanced search, looking in the custom type, search for file name (defined in
cm:content
😞 0 results, not expected. 
<li>Advanced search, looking in the content type, search for file name (defined in
cm:content
😞 1 result, as expected.
<li>CMIS search (in the Node Browser), search for custom content type metadata: 1 result, as expected.
<li>CMIS search (using Apache Chemistry), search for custom content type metadata: 1 result, as expected.
</ul>

In another Alfresco installation (in Tomcat, with Solr installed), Advanced Search works fine. It is in this WebLogic server, without Solr, that Advanced Search is not able to retrieve the queried document.

Could someone provide me some pointers about how to enable Alfresco Share to find documents using custom type metadata in Advanced Search (without Solr installed)?
6 REPLIES 6

mitpatoliya
Star Collaborator
Star Collaborator
If you are able to search in the node-browser as well then I guess the problem is not with the search engine.
In share when you search you have two option search in site and in repository.
There are chances you are not selecting the proper place to search.
Also are you getting any error in the logs?

The logs do not say anything wrong about the custom model loading, nor any problems during server restart. We searched in all available places (sites, repository), but to no avail looking in the custom model.

Curiously, if I search the
cm:name
looking in the custom type, no results are retrieved, but if I search for that same property in
cm:name
, documents are being retrieved.

g_rathod
Star Contributor
Star Contributor
When you are using alfresco with lucene, try to re-index or full indexing it will help to search content. For solr alfresco having scheduler running in background that will index the content but its not as quick. If you create content and quickly search will not sometime gives result in solr. Just check you have properly configured both.

We tried restarting the Alfresco server using full re-indexing, but the metadata-search-through-custom-type-in-Advanced-Search still exists. It's good to know Solr schedules indexing processes, though.

I'll provide a copy of the files used, in case someone can spot a mistake or omission in them.

ardamose123
Champ on-the-rise
Champ on-the-rise
I solved the problem. In the
share-config-custom.xml
file, the form id for my custom type was not
search
. When I changed that form ID to
search
, it worked. The custom type metadata can now be searched using Lucene, without Solr.

Thanks for your support!

Hi Ardamose,

Can you please share your share-config-custom.xml and your model changes.

Thanks Garvit