4teamwork/ftw.solr — pull request #34 by lukasgraf (2013-12-05 16:44:16+00:00)
Title: Add support for forward as well as reverse wildcard search

This change adds two new dynamic variables available in the search pattern, `value_lwc` and `value_twc`, that have leading respectively trailing wildcards added to them.

So given a query of `foo bar`, the values will look like this:

`value`: `(foo bar)`
`value_lwc`: `(*foo *bar)`
`value_twc`: `(foo* bar*)`

`value` will never contain any wildcards, and is basically what `base_value` was before (which has been dropped entirely).

Example query pattern using these variables:

`Title:{value}^20 OR Title:{value_twc}^5 OR Title:{value_lwc}^4`

Behavior changes:
- Wildcards always get removed from `value`
- `base_value` has been dropped
- `value` will always be enclosed in parentheses
- Any query containing double quotes is now considered non-simple
- Simple terms and simple searches are treated exactly the same (no more automatic adding wildcards to `value` for simple terms. This ensures live search and regular search always yield the same results, but requires you to use the wildcarded variables in the pattern to make the livesearch matches as fuzzy as before.