You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by jnagro <jo...@gmail.com> on 2008/02/07 17:31:29 UTC

Highlight on non-text fields and/or field-match list

I've done some searching through the archives and google, as well as some
tinkering on my own with no avail. My goal is to get a list of the fields
that matched a particular query. At first, I thought highlighting was the
solution however its slowly becoming clear that it doesn't do what I need it
to. For example, if I have a field in a document such as "username" which is
a string that I'll do wild-card searches on, Solr will return document
matches but no highlight data for that field. The end-goal is to know which
fields matched, at this point I don't need the highlighted fragment itself.
Is there any way to generate a list of matching fields? Something easier
than trying to parse debug information?

Thanks!


-- 
View this message in context: http://www.nabble.com/Highlight-on-non-text-fields-and-or-field-match-list-tp15337656p15337656.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Highlight on non-text fields and/or field-match list

Posted by Chris Hostetter <ho...@fucit.org>.
: to. For example, if I have a field in a document such as "username" which is
: a string that I'll do wild-card searches on, Solr will return document
: matches but no highlight data for that field. The end-goal is to know which

FYI: this is a known bug that results from a "safety" net in the 
SolrQueryParser...

	https://issues.apache.org/jira/browse/SOLR-195

...wildcards work in the trunk, and there is a workarround for 
prefix queries mentioned in the issue (you trick the queryparser into 
doing a wildcard query).

In general "fields" don't match queries, "documents" match queries ... 
highlighting can show you places "terms" and "phrases" appear in 
documents, but that doesn't garuntee that the "terms" highlighted are the 
reason the document matched the query.  the explain info is the only thing 
that can do that.




-Hoss