thank you . Hoss Tokenization is not a problem in english,but in some other languages like chinese, there are no space to seperate each term in article.Lt is a long string like this “AABCDAEFSABS”,in which “AA” and "BCD" ...represent a meaningful term ,so l want to boost some special and meaningful terms in user requested query after being tokenized
2012/10/4 Chris Hostetter <hossman_luc...@fucit.org> > > : if the query word is "ABCD",then after being tokenized it is "A" "BC" > "D" , > : l want to boost term "BC" ,so the query word is like this: "A BC^10 D" > and > : phrase query "ABCD" . all query words users typing in will be processed > : like that automaticly. > > it's not really clear from your example how/when you want to apply this > boosting -- ie: what makes "BC" special in your example? why boost BC and > not D? > > The best advice i can give you is that if you want to apply boosting at > querytime the appropriate place to do that is via some sort of QParser -- > you could either write your own QParser from scratch, supporting whatever > syntax you would like, and building up the Query objects you want using > whatever boosts you think make sense as your parse the query. > > Alternatively, you could write a QParser that wraps another QParser (like > dismax vor example) and delegates to it to parse the string and build a > query -- and then your custom QParser could modify that query object -- > but this would either require some hardcoded assumptions about what types > of queries the wrapped parser will produce, or lots of > introspection/reflection code. > > > -Hoss >