not  sure what to make of this...
The presence of the {!tag} entry changes the filter query generated by
the {!field...} tag. Note below that in one case the filter query is a
phrase query, and in the other it's parsed with one term against the
specified field and the other against the default field.

Using the example data, submitting this:

http://localhost:8983/solr/collection1/select?q=*:*&fq={!tag=name_name}{!field
f=name}United States&wt=json&indent=true&debug=query

generates this response:
{
  responseHeader:
  {
    status: 0,
    QTime: 10,
    params:
    {
      indent: "true",
      q: "*:*",
      debug: "query",
      wt: "json",
      fq: "{!tag=name_name}{!field f=name}United States"
    }
  },
  response:
  {
    numFound: 0,
    start: 0,
    docs: [ ]
  },
  debug:
  {
    rawquerystring: "*:*",
    querystring: "*:*",
    parsedquery: "MatchAllDocsQuery(*:*)",
    parsedquery_toString: "*:*",
    QParser: "LuceneQParser",
    filter_queries:
    [
      "{!tag=name_name}{!field f=name}United States"
    ],
    parsed_filter_queries:
    [
      "name:united text:states"
    ]
  }
}


while this one:
http://localhost:8983/solr/collection1/select?q=*:*&fq={!field
f=name}United States&wt=json&indent=true&debug=query

gives:
{
  responseHeader:
  {
    status: 0,
    QTime: 3,
    params:
    {
      indent: "true",
      q: "*:*",
      debug: "query",
      wt: "json",
      fq: "{!field f=name}United States"
    }
  },
  response:
  {
    numFound: 0,
    start: 0,
    docs: [ ]
  },
  debug:
  {
    rawquerystring: "*:*",
    querystring: "*:*",
    parsedquery: "MatchAllDocsQuery(*:*)",
    parsedquery_toString: "*:*",
    QParser: "LuceneQParser",
    filter_queries:
    [
      "{!field f=name}United States"
    ],
    parsed_filter_queries:
    [
      "PhraseQuery(name:"united states")"
    ]
  }
}

**** Of course quoting "United States" works. Escaping the space does
NOT change the behavior when {!tag...} is present.

Is this worth a JIRA or am I just missing the obvious?

Erick

Reply via email to