Robert Muir told me that there is somewhat of a workaround for this. For
defType=lucene. Just escape every whitespace with a slash. So instead of *new
dress shoes* search for *new\ dress\ shoes*. Of course you lose the ability
to use normal lucene syntax.

I was hoping that this workaround would also work for defType=dismax, but
with or without the escaped whitespace, queries get interpreted the same,
incorrect way. For instance, assume I have the following line in my
synonyms.txt: *dress shoes => dress_shoes*. Further assume that I have a
field *experiment* that gets analysed with synonyms. A search for *new
dress shoes*(with or without escaped spaces) will be interpreted as

*+((experiment:new)~0.01 (experiment:dress)~0.01 (experiment:shoes)~0.01)
(experiment:"new dress_shoes"~3)~0.01*

The first clause is manditory and contains independently analysed tokens,
so this will only match documents that contain "dress", "new", or "shoes",
but never "dress shoes" because analysis takes place as expected at index
time.

Reply via email to