: How can I boost words where the whole value (not just the token) is closer to
: the front of the value?  That is, I want 'ca' to return:
:  1. Canon PowerShot
:  2. Canon EX PIXMA
:  3. iPod Cable
:  4. Video Card
: (actually 1&2 could be swapped)

i would argue that you don't want #3 and #4 at all if you are doing query 
suggestion, instead make hte field you query use a KeywordTokenizer with 
the EdgeNGramFilter so "ca" only matches #1 and #2.

if you really want #3 and #4 to show up, then have two fields: one using 
whitespace tokenizer, one using keyword tokenizer; both using 
EdgeNGramFilter ... boost the query to the first field higher then the 
second field (or just rely on the coordFactor and the fact that "ca" will 
match on both fields for "Canon PowerShot" but only on thesecond field for 
"iPod Cable"

: After that works, how do I boost tokens that are closer together?  If I search
: for 'canon p', how can I make sure the results are returned as:
:  1. Canon PowerShot
:  2. Canon EX PIXMA

i think the two fields i described above will solve that problem as well.




-Hoss

Reply via email to