cancel
Showing results for 
Search instead for 
Did you mean: 

Search faceting and highlighting

alex_chew
Champ in-the-making
Champ in-the-making
Hi,

I am trying to implement search faceting and highlighting within Alfresco Share.  My initial thoughts are,
1, switch search to solr sub-system which can enable faceting (there has API to add facet fields to SearchParameters before starting searchService.query() method)
2, because the content must be stored in index, I can add an customized field MYCONTENT to index. This can be archived by customizing ADMLuceneIndexerImpl and AVMLuceneIndexerImpl
3, I can access SOLR instance via solrj APIs. Here I can control almost anything like hightling , faceting or filtering.
4, I also can customize the scriptable Search (org.alfresco.repo.jscript.Search) to call my search method which has implemented in step 3
5, I can add highlighting and faceting results to response JSON data. this can be done by customizing search.get.json.ftl
6, If everything goes ok, I can add the returned facets and highlighting results to the web page by customizing search.get.html.ftl and search.js

I spent 4+ days on this and tried some tests. But I didn't get the result I want yet. here are the problems I got,
1, I added a multi-valued MYCONTENT field to the index but I cannot see it while checking solr index schema
2, I cannot get any result when I switched to SOLR sub-system. But when search using lucene sub-system I can get results from Datalist, WIKI page, documents etc.
3, I also cannot get any result from solrj APIs. And there has no NODEREF field in the index so I have to find a way to build NodeRef from raw index record. It seems not easy. Or I have to store the NODEREF to index directly

Does anyone have experience to do implement this kind of features? Any suggestions will be appreciated.
My Alfresco version is 4.0.c CE.

Regards,
Alex
1 REPLY 1

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
Hi Alex,

I included some Solr/Alfresco pointers to your other post (recent Solr Tech Talk Live among others).
Here is the link for other users interested in Alfresco Solr integration:

https://forums.alfresco.com/en/viewtopic.php?f=6&t=45725#p135110