[Building Sakai] search tool Q: search just titles / index descriptions

Zhen Qian zqian at umich.edu
Mon Aug 22 11:56:05 PDT 2011


I think one need to implement EntityContentProducer interface for each content object to be searched for.

You can look for the example codes of ContentHostingContentProducer.java nad SiteContentProducer.java inside the Search module. Specially, for ContentResource objects, there are multiple registered "Digester" instances for various mime types. The digester implementation determines what gets written into the index (through the getContent() call).

I believe the description field is indexed as in DefaultContentDigester, however, it is not in other mime-type digesters. Hence you will find that you can search on the description field value for *.png files, but not for other types of files, e.g. pdf files, or ppt files.

So my answer to both your questions below is that there is no trivial/property-setting solution. It needs code changes in search-impl code.

Thanks,

- Zhen

On Aug 22, 2011, at 11:19 AM, Adam Marshall wrote:

> 1/ Could anybody comment on how easy it would be to add a checkbox to the search tool to say "this time, just search the titles"? I am guessing that it will not be trivial.
> 
> 2/ Has anybody modified the tool to index resource descriptions?
> 
> adam
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> 
> 



More information about the sakai-dev mailing list