Hello-
I'm building an interface where I need to display matching options as a
user types into a search box. Something like google suggest, but it
needs to be a little more flexible in its matches.
It first glance, I thought I just needed to write a filter that chunks
each token into a set of prefixes. Check SOLR-357 -- As Hoss points
out, I may just be able to use the EdgeNGramFilterFactory.
I have the basics working, but need some help getting the details to
behave properly.
Consider the strings:
Canon PowerShot
iPod Cable
Canon EX PIXMA
Video Card
If I query for 'ca' I expect to get all these back. This works fine,
but I need help with is ordering.
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)
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
thanks
ryan