And also, what query parser are you using? On Jan 11, 2010, at 2:46 PM, Grant Ingersoll wrote:
> What do your FieldTypes look like for the fields in question? > > On Jan 10, 2010, at 10:05 AM, rswart wrote: > >> >> Hi, >> >> This is probably an easy question. >> >> I am doing a simple query on postcode and house number. If the housenumber >> contains a minus sign like: >> >> q=PostCode:(1078 pw)+AND+HouseNumber:(39-43) >> >> the resulting parsed query contains a phrase query: >> >> +(PostCode:1078 PostCode:pw) +PhraseQuery(HouseNumber:"39 43") >> >> This never matches. >> >> What I want solr to do is generate the following parsed query (essentially >> an OR for both house numbers): >> >> +(PostCode:1078 PostCode:pw) +(HouseNumber:39 HouseNumber:43) >> >> Solr generates this based on the following query (so a space instead of a >> minus sign): >> >> q=PostCode:(1078 pw)+AND+HouseNumber:(39 43) >> >> >> I tried two things to have Solr generate the desired parsed query: >> >> 1. WordDelimiterFilterFactory with generateNumberParts=1 but this results in >> a phrase query >> 2. PatternTokenizerFactory that splits on (\s+|-). >> >> But both options don't work. >> >> Any suggestions on how to get rid of the phrase query? >> >> Thanks, >> >> Richard >> -- >> View this message in context: >> http://old.nabble.com/Tokenizer-question-tp27099119p27099119.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> > > -------------------------- > Grant Ingersoll > http://www.lucidimagination.com/ > > Search the Lucene ecosystem using Solr/Lucene: > http://www.lucidimagination.com/search > -------------------------- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem using Solr/Lucene: http://www.lucidimagination.com/search