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

Parse Interval Query from JSON API

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • query parsers
    • None

    Description

      Context

      Lucene has Intervals query LUCENE-8196. Note: these are a kind of healthy man's Spans/Phrases. Note: It's not about ranges nor facets.

      Problem

      There's no way to search by IntervalQuery via JSON Query DSL.

      Suggestion

      • Create classic QParser {{ {!interval df=text_content}

        a_json_param}}, ie one can combine a few such refs in json.query.bool

      • It accepts just a name of JSON params, nothing like this happens yet.
      • This param carries plain json which is accessible via req.getJSON()

      please examine https://cwiki.apache.org/confluence/display/SOLR/SOLR-13764+Discussion+-+Interval+Queries+in+JSON for syntax proposal.

      Challenges

      • I have no idea about particular JSON DSL for these queries, Lucene API seems like easy JSON-able. Proposals are welcome.
      • Another awkward things is combining analysis and low level query API. eg what if one request term for one word and analysis yield two tokens, and vice versa requesting phrase might end up with single token stream.
      • Putting json into Jira ticket description

      Q: Why don't..

      .. put intervals DSL right into json.query, avoiding these odd param refs?
      A: It requires heavy lifting for JsonQueryConverter which is streamlined for handling old good http parametrized queires.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkhl Mikhail Khludnev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: