[hibernate-dev] [AND] Search: changing the way we search

Guillaume Smet guillaume.smet at gmail.com
Tue Mar 18 13:26:50 EDT 2014


Hi,

On Tue, Mar 4, 2014 at 7:06 PM, Guillaume Smet <guillaume.smet at gmail.com> wrote:
> I'll post as soon as I have a working prototype of what I would like
> to achieve and then we can discuss from there.

I finally succeeded in committing a few hours to prototype what I have in mind:
https://github.com/openwide-java/hibernate-search/commits/prototype-plain-text-search

It's a very simple patch. I added a test case to the DSLTest.

It's a work in progress but I think it might be easier to understand
what I have in mind once you have taken a look at this.

I needed the SimpleQueryParser of Lucene 4.7 so I included it: it's a
vanilla version so we can remove it after the move to 4.7.

What I would like to do:
- add the ability to indicate that you want a fuzzy search for a given
field in the DSL
- I don't like the withAllTerms() option. I would like this behavior
to be the default and to have something like "defaultOperatorIsOr()":
it defines the default operator when you don't use an explicit one.
I'm not sure defaultOperatorIsOr() is something
acceptable/understandable.

Where I would like advice/opinion:
- does it look like a good idea or something horrible?
- I'm still hesitant about what to do with field bridges: atm, I don't
take them into account at all
- I think having a DSL branch for text search is necessary even if it
might seem very similar to term search

Comments welcome.

-- 
Guillaume


More information about the hibernate-dev mailing list