[hibernate-dev] [Search] DisjunctionMaxQuery and MoreLikeThis

Emmanuel Bernard emmanuel at hibernate.org
Thu Feb 20 12:33:34 EST 2014


That is definitely something I think Hibernate Search lacks.
Offer an implementation that can in a robust way swallow a user provided
query input and create the right query.
This is not something we have had time to explore seriously.

BTW DisjunctionMaxQuery (which is what I refered to in .dismax()) is
used in the DisMax query parser of Slor but is only a component of it.
So I see your requested feature as a different one than what I discussed
in this email. Still a useful one.

Sanne, how do you think we should follow up?

On Thu 2014-02-20 16:10, Guillaume Smet wrote:
> Hi Emmanuel,
> 
> On Thu, Feb 20, 2014 at 10:19 AM, Emmanuel Bernard
> <emmanuel at hibernate.org> wrote:
> > ## DisMax as top level DSL feature
> >
> > Should we add .dismax() like we did bool()?
> > I am hard pressed to find a use case.
> 
> It's a project I have for a long time. I wanted to have an intern this
> year to work on this and a few other search features I have in mind
> for HSearch. It becomes more and more obvious I won't have the time to
> work on this myself but I wanted to be able to play with this idea
> anyway. That said, I haven't found anyone so far...
> 
> Background: I worked a lot with Apache Solr before switching to Java
> and Hibernate Search.
> 
> Apache Solr has a (e)dismax query parser which IMHO is very very useful.
> 
> The principle is the following:
> - you have a text to search typically: hibernate search is great
> - you tell him to search it in title^5 content^2
> - you tell him that starting with 3 words, it can ignore 1 (mm
> parameter = minimum should match)
> and it builds a search query doing exactly that.
> 
> The edismax query parser is quite advanced, sometimes a little buggy
> but it's usually what I want when I implement a search engine. The
> only thing we have added so far in our Solr powered application is the
> fact that we also support search in fields with a fuzzy query. So you
> can have: title~0.8^5 content~0.8^2 (it's not perfect as fuzzy queries
> are weird but it does the job and you use it only if you want it).
> 
> Reference is here: https://wiki.apache.org/solr/ExtendedDisMax
> 
> The most interesting parameters to understand the principle are qf and
> mm, but the others are quite useful too.
> 
> Happy to discuss this subject.
> 
> -- 
> Guillaume


More information about the hibernate-dev mailing list