views:

33

answers:

2
+2  Q: 

Advanced search

We are going to provide an advanced search option on a system that will let users find events that matches a name (textual search), have on or more tags assigned to it and that will start before or after a given date. Should I consider using hibernate search or something similar? Or should I just generate some jpql queries to get that search feature working.

Thanks

A: 

use hibernate search, that is what it is there for and you will get better performance

trying to construct the queries on the terms you mentioned

  • name
  • date
  • date range
  • tag
  • plus support for boolean queries

just to complex

Aaron Saunders
A: 

I'd suggest taking a good look at Hibernate Search so you can leverage the power of Lucene.

If you relatively simple requirements for search initially, perhaps implementing it yourself won't be so bad, but as you want to add features and scale up your search, this will require you to write more and more code and make the feature more complicated. Why not reuse a powerful, well-known library that already does all of this (and more)?

matt b