6

Recently in our organisation we've decided to work with maven site plugin and maintain all the documentation about our project in the site generated by maven. However I haven't found any way to add a search functionality, the only thing I've come across that some skins provide an integration with the google search engine, but I can't use it because we're running in our own network and there is no chance to make it 'indexable' from outside.

So, my question is whether someone can suggest a descent solution for this? I thought about developing a kind of maven plugin that would run lucene and index everything by itself and then provide an API to use this search from within the site, but I hope I won't need to reinvent the wheel :) So any suggestion will be welcome here

Thanks in advance

Mark Bramnik
  • 39,963
  • 4
  • 57
  • 97

5 Answers5

2

Just an idea, you can try to use JavaScript based full-text search engine e.g. http://jssindex.sourceforge.net/

maneo
  • 39
  • 2
  • Thanks for pointing on this project - I've never heard of it, looks totally awesome, although I'm more into maven based solution. Still +10 points from me :) – Mark Bramnik Jan 17 '13 at 07:57
  • 1
    Thanks ;-) But after a while I think that it maybe simpler to have an instance of SOLR server set up in your intranet. Use approach similar to the one described here: [link](http://blog.building-blocks.com/building-a-search-engine-with-nutch-and-solr-in-10-minutes) and query this server in your maven site template. Setup a cron for reindexing to make an up-to-date queries. – maneo Jan 17 '13 at 08:00
  • @maneo, simpler? I don't know... If the intention is to provide a generally available Maven plugin or an extension to the site plugin (includeSiteSearch=true/false) then the requirement to setup SOLR would definitely hinder adoption. – Marcel Stör Jan 17 '13 at 08:12
  • You are right if the intention is to provide a general self-contained solution ;-) The simplest way is to handle this in an embeded javascript this tipue/search looks very nice (I wonder how it scales). – maneo Jan 17 '13 at 09:29
2

We are using constellio to index the published site on a schedule. That works well so far.

I've raised http://jira.codehaus.org/browse/MSKINS-88 to cover adding a generic search form to the fluido skin which we use to build our maven sites. Hopefully that'll be progressed and we can have the search form baked into the documentation.

barnyr
  • 5,678
  • 21
  • 28
1

I know this is an old question, but a very easy (and admittedly ugly) way to accomplish what you want is simply generating a PDF with the site contents and letting your users do the search on the PDF. The advantage over searching on the generated site is that any PDF reader will be able to search the whole document.

mvn pdf:pdf
Akira
  • 4,001
  • 1
  • 16
  • 24
  • I do use this solution. I am deploying the PDF as part of the site and adding a link to the PDF on the site. So anyone wanting to search the whole site is pointed to the PDF. Dirty and simple. – Akira Aug 05 '15 at 21:26
0

If you cannot use Google Site Search you're dependent on local search implementations. Hence, you either need to build the index during the site build (and for it to be available as part of your site) or do both index and search in the browser.

Besides JSSindex which appears to be somewhat dated there's http://www.tipue.com/search/ which is based on jQuery.

Marcel Stör
  • 22,695
  • 19
  • 92
  • 198
0

Maven site plugin approach is not widely used. So there is nothing specific for indexing yet. You should look at non-maven tools.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332