Hi Marc,
Quote:
Perhaps this is something to support in the querybuilder as well?
Maybe. The DSL and the query parser have slightly different usecases though (imo). What the DSL range query tries to do is to save you the time to convert your from and to parameters (remember search parameters are strings). You can pass dates, strings, numbers etc to
from and
to and Search will transparently apply the right bridge and analyzer to generate the actual search strings.
Lucene's query parser is much higler level. It is basically there to allow internet search engine like queries. In a way it is its own DSL. You can combine Search DSL queries and Lucene query-parser queries using boolean queries.
Should the from and to have something similar than the '*' - maybe. In this case I would imagine though that it would be better to extend the DSL by adding new methods to the
range query. Or maybe
from and
to should be optional and if omitted represent the equivalent to '*'. I haven't thought this through all the way and I am not sure whether there would be any problems with this approach, but it sounds ok on first thought. WDYT?
Maybe you want to create a Jira issue describing your usecase.
--Hardy