[
https://issues.apache.org/jira/browse/SOLR-3705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432077#comment-13432077
]
Hoss Man commented on SOLR-3705:
--------------------------------
Can you describe what behavior you sould expect if hl.alternateField supported
globs? .. i honestly don't understand what that would even mean functionally.
the use of hl.alternateField is to specify field used to provide a literal
value when a snippet can not be generated for an hl.fl field.
So using the solr example data, a request like this...
http://localhost:8983/solr/collection1/select?q=video&hl=true&fl=id&hl.fl=name&hl.fl=manu&hl.alternateField=id
would cause docs that can't generate snippets against either the manu or video
field to use the full value of the "id" field instead (it's a contrived
example, but you get the idea)
furthermore, hl.alternateField supports per field overrides, so you can use
something like this to specify exactly what field value to use as a fallback
when no snippets can be created for a field...
http://localhost:8983/solr/collection1/select?q=video&hl=true&fl=id&hl.fl=name&hl.fl=manu&f.name.hl.alternateField=name&f.manu.hl.alternateField=manu
...you can even use these per field overrides in combination with globs in
hl.fl...
http://localhost:8983/solr/collection1/select?q=video&hl=true&fl=id&hl.fl=*&f.name.hl.alternateField=name&f.manu.hl.alternateField=manu
...so that if a field produces a snippet, that snippet will be used, and if
specificly picked fields (name and manu in this example) don't produce
snippets, they will still be included explicitly.
But i have no idea what you would expect to happen if you tried to something
like...
*
http://localhost:8983/solr/collection1/select?q=video&hl=true&fl=id&hl.fl=*&hl.alternateField=*
*
http://localhost:8983/solr/collection1/select?q=video&hl=true&fl=id&hl.fl=foo_*&f.foo_yak.hl.alternateField=foo_bar_*&hl.alternateField=summary
?
> hl.alternateField does not support glob
> ---------------------------------------
>
> Key: SOLR-3705
> URL: https://issues.apache.org/jira/browse/SOLR-3705
> Project: Solr
> Issue Type: Improvement
> Components: highlighter
> Affects Versions: 4.0-ALPHA
> Reporter: Markus Jelsma
> Priority: Minor
> Fix For: 5.0
>
>
> Unlike hl.fl, the hl.alternateField does not support * to match field globs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]