Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11972

range of numeric values with unit in Solr

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 6.6
    • None
    • Schema and Analysis
    • None

    Description

      My problem is that i have documents containing a numeric value and a unit like this:

      weight:100g

      weight:1000kg

      And i want to make querys like this:

      weight:[5g TO 100KG]

      Of course this doent work as easy as it sounds, the values are saved as strings. I did some research and came up with thisĀ https://dzone.com/articles/build-a-custom-solr-filter-to-handle-unit-conversions.

      This worked out pretty well, i can search for: weight:100000g and get results containing weight:100kg, nice. But i cant figure out how to extend this, to make a range-search possible

      Attachments

        Activity

          People

            Unassigned Unassigned
            Azmy Atef
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: