Hello Solr friends: Mr. Klaas - I've not tested your patch yet (will try to get to it soon) but I've found almost the opposite problem now and people are questioning how/why things are happening as they are.
I'm searching for the word "illegal" and the query results are coming back with an entry that has "illegible" in it. "illegible" is highlighted as well. I'm strictly searching for "illegal" - no modifiers (well, a + to indicate I have to have it, but no ~ modifier). I'm a newb to all this, so please bear with me. I'm using the standard 'text' field schema definition in the default 'schema.xml' to index this field data. Does that account for partial and/or soundalike matches by default? Thanks! On 2/6/07, Mike Klaas <[EMAIL PROTECTED]> wrote:
On 2/6/07, Michael Kimsal <[EMAIL PROTECTED]> wrote: > When you say rewrite the query, what specifically do you mean? I'm googling > (direct and on the solr site) > for query.rewrite, but nothing is jumping out at me as anything that's > useful/pertinent. It sounds like > you're telling me to do some manipulation on the query first, but I'm > currently > just passing queries as part of the GET string in an HTTP request (this was > my main > attraction to SOLR in the first place) Is there a way to trigger the > 'rewrite' functionality via > another GET parameter? Not currently. However, you could try applying the following patch (untested): Index: solr/request/StandardRequestHandler.java =================================================================== --- solr/request/StandardRequestHandler.java (revision 503874) +++ solr/request/StandardRequestHandler.java (working copy) @@ -138,9 +138,9 @@ SolrException.logOnce(SolrCore.log, "Exception during debug", e); rsp.add("exception_during_debug", SolrException.toStr(e)); } - + NamedList sumData = HighlightingUtils.doHighlighting( - results.docList, query, req, new String[]{defaultField}); + results.docList, query.rewrite(req.getSearcher().getReader()), req, new String[]{defaultField}); if(sumData != null) rsp.add("highlighting", sumData); } -Mike
-- Michael Kimsal http://webdevradio.com