Determining individual Field matches within a SolrRequestHandler or SearchComponent

2012-03-31 Thread Joshua Sumali
Hi,

Is it possible to easily and programmatically determine whether one or more 
solr fields were a successful match within a SolrRequestHandler or 
SearchComponent?

The DebugComponent provides similar text output when debugging/explaining a 
query:

8.249506 = (MATCH) fieldWeight(attribution_en:leigh in 2313441)

Class org.apache.lucene.search.Explanation has an isMatch() - is there anything 
similar, but on a per-field basis?

I've dug through the solr and lucene source a bit, and it doesn't seem like 
this is available anywhere.

If this is the case, what's my next best option? Comparing the query text to 
the field(s) in question?

Thanks,
Josh


RE: Search for "library" returns 0 results, but search for "marion library" returns many results

2012-04-04 Thread Joshua Sumali
Did you try to append &debugQuery=on to get more information?

> -Original Message-
> From: Sean Adams-Hiett [mailto:s...@advantage-companies.com]
> Sent: Wednesday, April 04, 2012 10:43 AM
> To: solr-user@lucene.apache.org
> Subject: Search for "library" returns 0 results, but search for "marion 
> library"
> returns many results
> 
> This is cross posted on Drupal.org: http://drupal.org/node/1515046
> 
> Summary: I have a fairly clean install of Drupal 7 with 
> Apachesolr-1.0-beta18. I
> have created a content type called document with a number of fields. I am
> working with 30k+ records, most of which are related to "Marion, IA" in some
> way. A search for "library" (without the quotes) returns no results, while a
> search for "marion library" returns thousands of results. That doesn't make
> any sense to me at all.
> 
> Details:
> 
>   Drupal 7 (latest stable version)
>   Apachesolr-1.0-beta18
>   Custom content type with many fields
>   LAMP stack running on Centos Linode
>   PHP 5.2.x
> 
> 
> I also checked this through the solr admin interface, running the same
> searches with similar results, so I can't rule out the possibility that 
> something
> is configured wrong... but since I am using the solrconfig.xml and schema.xml
> files provided with the modules, it is also a possibility that the issue lies 
> here
> as well. I have watched the logs and during the searches that produce no
> results but should, there is no output in the log besides the regular
> [INFO] about the query.
> 
> I am stumped and I am past a deadline with this project, so any help would
> be greatly appreciated.
> 
> --
> Sean Adams-Hiett
> Director of Development
> The Advantage Companies
> s...@advantage-companies.com
> www.advantage-companies.com