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

Query parsing ignores rest of query when 'v' local-param is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • query parsers
    • None

    Description

      One of Solr's nasty/tricky gotchas is debugging a query that looks like this:

      q={!parser v=queryString} OR ignored
      

      Because this query string starts with {! and it has a v local-param, it means everything after the first } is ignored!
      Experienced Solr users figure out to put a leading space on this as a hack. I've had to explain this several times and, really, Solr should fix this. Basically, if there is text following that bracket, then parse the whole string using Solr's lucene query parser which can recognize embedded queries like this.

      Example of a confused user:
      https://stackoverflow.com/questions/70658152/showing-parents-without-children-in-solr-search-too

      Attachments

        Activity

          People

            Unassigned Unassigned
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: