: Thanks. Yes I came up with a hacked solution to the problem. Takes a : Query and rewrites the Terms using the Analyzer. If the Analyzer
typcially the Analisys happens before you construct a Query object -- where are these Queries comping from that they are already objects but haven't been analyzed? : returns more than one Token then those are ignored. Made Term.text : public. Good enough for now, can be improved looks like QueryParser : already does something like this, however I am confused what the rules : are for adding multiple new Terms to a Query. it depends on wether the tokens occupy the same position. if multiple sequential tokens are returned, it builds a phrase query, if multiple parallel tokens are returned it builds BooleanQuery (using SHOULD) ... if multiple tokens are reutrned and *some* of the tokens occupy the same position, then a MultiPhraseQuery is constructed. : : ----- Original Message ---- : From: Erik Hatcher <[EMAIL PROTECTED]> : To: solr-dev@lucene.apache.org : Sent: Monday, August 28, 2006 6:02:46 PM : Subject: Re: Possible bug in copyField : : : On Aug 28, 2006, at 3:37 PM, jason rutherglen wrote: : : > Could someone point me to where in the Solr code the Analyzer is : > applied to a query parser field? : : IndexSchema.java is where the analyzers are created for indexing and : for query parsing. It's fairly sophisticated in order to take into : account all the various field settings from schema.xml. Hope that : helps. : : Perhaps preaching to the choir... Be aware that changing an analyzer : once documents are indexed does not change how they are indexed. : They'll need to be re-added to pick up new analysis configuration. : : Erik : : : : : : : -Hoss