0

I am making an application where I am going to need full text search so I found Compass, but that project is no longer maintained and is replaced by elasticsearch. However I don't understand it. Is it a own server that I need to do requests (get, put) etc against and then parse the JSON response? Are there no annotations like in Compass? I don't understand how this is a replacement and how I use it with Java EE.

Or are there other better projects to use?

javanna
  • 59,145
  • 14
  • 144
  • 125
LuckyLuke
  • 47,771
  • 85
  • 270
  • 434

3 Answers3

3

Elasticsearch is a great choice nowadays, if you liked Compass you'll love it. Have a look at this answer that the author gave here on which he explains why he went ahead creating elasticsearch after Compass. In fact elasticsearch and Solr make both the use of Lucene pretty easy, adding also some features to it. You basically have a whole search engine server which is able to index your data, which you can then query in order to retrieve the data that you indexed.

Elasticsearch exposes RESTful APIs and it's JSON based, but if you are looking for annotations in the Compass style you can have a look at the Object Search Engine Mapper for ElasticSearch.

Community
  • 1
  • 1
javanna
  • 59,145
  • 14
  • 144
  • 125
  • Awesome, and how do I work with this in Java? I saw there was a client, is that it? And how can I integrate elastic search with JPA so that the data is in sync? – LuckyLuke Sep 15 '12 at 09:45
  • You can use the elasticsearch [Java APIs](http://www.elasticsearch.org/guide/reference/java-api/), like in the example of the OSEM project itself, which adds nice annotations to the existing Java APIs. – javanna Sep 15 '12 at 10:33
  • Another great answer from @javanna :-) – jpountz Sep 17 '12 at 22:13
2

I would say give a try on lucene or solr. It creates a DocumentFileSystem for faster indexing

Chris
  • 5,584
  • 9
  • 40
  • 58
1

I would recommend either

  1. Elasticsearch, if the system is big and need clustering.
  2. Lucene or Solr, if you want to code at a low level
  3. Hibernate search, if you are using Hibernate as your ORM.
sudhir shakya
  • 827
  • 1
  • 9
  • 21