Yonik Seeley schrieb: > On 7/23/06, karl wettin <[EMAIL PROTECTED]> wrote: >> I'm want to filter words with a dash in them. >> >> ["x-men"] >> ["xmen"] >> ["x", "men"] >> >> All of above should be synonyms. The problem is ["x", "men"] requiring a >> distance between the terms and thus also matching "x-men men". > > WordDelimiterFilter from Solr does this: > http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-1c9b83870ca7890cd73b193cefed83c283339089 >
I can recommend this too. I use it and it works fine! I just do a LowerCaseFilter afterwards to avoid the downside: "if source text is "powershot" then a query of "PowerShot" won't match!" > > It also has the false match problem you mention... "x xmen" would > match a document with x-men, although this hasn't been a problem in > practise. > > -Yonik > http://incubator.apache.org/solr Solr, the open-source Lucene search server > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Universitaetsbibliothek Heidelberg Tel: +49 6221 54-2580 Ploeck 107-109, D-69117 Heidelberg Fax: +49 6221 54-2623 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]