lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: Any contribs available for Range field type?
Date Fri, 11 Feb 2011 14:50:31 GMT
You can solve this as is by having a start and end field,
rather than a range field. Then add a clause like

+(+start:[* TO target] +end:[target TO *])

Best
Erick

On Fri, Feb 11, 2011 at 8:49 AM, kenf_nc <ken.foster@realestate.com> wrote:
>
> I have a huge need for a new field type. It would be a Poly field, similar to
> Point or Payload. It would take 2 data elements and a search would return a
> hit if the search term fell within the range of the elements. For example
> let's say I have a document representing an Employment record. I may want to
> create a field for years_of_service where it would take values 1999,2004.
> Then in a query q=years_of_service:2001 would be a hit,
> q=years_of_service:2010 would not. The field would need to take a data type
> attribute as a parameter. I may need to do integer ranges, float/double
> ranges, date ranges. I don't see the need now, but heck maybe even a string
> range. This would be useful for things like Event dates. An event often
> occurs between several days (or hours) but the query is something like "what
> events are happening today". If I did q=event_date:NOW (or similar) it
> should hit all documents where event_date has a range that in inclusive of
> today. Another example would be product category document. A specific
> automobile may have a fixed price, but a category of auto (2010 BMW 3-series
> for example) would have a price range.
>
> I hope you get the point. My question (finally) is, does anyone know of an
> existing contribution to the public domain that already does this? I'm more
> of a .Net/C# developer than a Java developer. I know my way around Java, but
> don't really have the right tools to build/test/etc. So was hoping to borrow
> rather than build if I could.
>
> Thanks,
> Ken
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Any-contribs-available-for-Range-field-type-tp2473601p2473601.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Mime
View raw message