Solr
  1. Solr
  2. SOLR-3332

How to index a range of values in solr

    Details

    • Type: Task Task
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have equipments site , need to index equipment specifications
      Some of specifications are range of values
      for example
      i have an equipment , have minimum voltage 10 v and maximum voltage 220 v
      i need to index it . so when a user search for equipment with 110 v can find this one in the results
      TY

        Activity

        Hide
        Erick Erickson added a comment -

        First, please ask questions like this on the Solr user's list rather than raising a JIRA, JIRAs are intended for code development.

        But in your case you can index a min_voltage as 10 and a max_voltage as 240. Now you just form queries (or filter queries, fq) like
        min_voltage:[* TO 110] AND max_voltage:[110 TO *]

        Show
        Erick Erickson added a comment - First, please ask questions like this on the Solr user's list rather than raising a JIRA, JIRAs are intended for code development. But in your case you can index a min_voltage as 10 and a max_voltage as 240. Now you just form queries (or filter queries, fq) like min_voltage: [* TO 110] AND max_voltage: [110 TO *]

          People

          • Assignee:
            Unassigned
            Reporter:
            mohamed badawi
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development