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

Emmanuel Bernard emmanuel at hibernate.org
Tue Mar 4 11:31:04 EST 2014


On 04 Mar 2014, at 15:07, Guillaume Smet <guillaume.smet at gmail.com> wrote:

> On Tue, Mar 4, 2014 at 1:24 PM, Emmanuel Bernard <emmanuel at hibernate.org> wrote:
>> And to be fair, how do you plan to make wildcard and wi fi work together in Lucene (any solution available). The solution I can think of is to index the property with an analyzer stack that does not split words like that in two tokens.
> 
> I don't use them for wildcard queries but I do use them for plain text
> queries and I need to be able to do that in that case. If we define a
> tokenizer phase then a normalizer phase in the analyzer definition, I
> won't be able to do so for my plain text queries. Or do you have
> something more specific to wildcard queries in mind?

I am not quite sure what you are referring to by plain text query.
To me that would be

qb.keyword().onFields(“title”, “description”).matching(search).createQuery();

or very close to that.


More information about the hibernate-dev mailing list