Hi Tobi, On 3/16/2009 at 9:14 AM, Tobias Dittrich wrote: > how can I query multiple fields in such way that for each of > the fields the configured analyzer stack with Tokenizer is > used for the whole query string?
Lucene's QueryParser (and AFAIK, Solr's QPs too) first break queries on whitespace (except quoted strings), and then sends individual words to be analyzed by the appropriate analyzer. One way to ensure that an analyzer sees the whole string at once is to enclose the query in quotation marks. This is not ideal. Another way (that I've never used): Solr's FieldQParserPlugin will send the entire string for a field to the appropriate analyzer; Chris Hostetter explains here: <http://www.lucidimagination.com/search/document/ea7b0b27b1b17b1c/re_replacing_fast_functionality_atsesam_no_shinglefilter_exactmatching> PositionFilter was created to make ShingleFilter work better with query parsing, by making the positions of the generated shingles all be the same, which triggers "synonym" handling - any one of the generated shingles will cause a hit if present in a document: <http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#head-7563e3bc4d5f7874c4c0ff824671e9ca62f40524> Steve