[hibernate-dev] Search 5 migration pains: MultiFieldQueryParser and Numeric Fields

Hardy Ferentschik hardy at hibernate.org
Mon Jan 26 08:39:06 EST 2015


Hi,

On Mon, Jan 26, 2015 at 01:21:20PM +0000, Sanne Grinovero wrote:
> As reported on SO [1], it's not a straight forward migration for those
> who embraced the convenience of using a MultiFieldQueryParser, or one
> of the other Lucene provided parsers.

That is correct, but we knew that right? The docs explain the situation and
we need to make sure that we answer these type of questions.

> In the specific example, I think the right answer would be to use the
> programmatic API or our DSL.. 

It depends. If the user wants to keep the old behaviour and is happy with
it, he can just make sure that the numeric values as indexed as strings.
Personally, I am not going to recommend to switch to the DSL.

> Wouldn't it be nice to have a custom "parser" in our DSL, which
> essentially mimicks the functionality of the MultiFieldQueryParser but
> takes advantage of our indexing metadata - like we do for the HQL
> Parser?

We could in fact do that. I thought there was even an issue for that.
If not I at least wanted to create one ;-) As you are saying, we have the 
required information (whether a field is numeric or not) available. So we could
write a custom QueryParser which takes this into account. We might even not
only use it in the DSL, but also make it available standalone

--Hardy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 496 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/hibernate-dev/attachments/20150126/fbebb30f/attachment.bin 


More information about the hibernate-dev mailing list