Skip to content
Advertisement

SOLR issue with words containing dash, hypens etc

for some reason my SOLR installation acts wonky (im also a newbie fo this topic..)

example: in my DB i have an item named “Brandname XX-7 Yadda Ladida”

if i search:

Brandname XX7 I don’t get the item on the results (first 20) at all

Brandname XX-7 I get the expected result in 8th position; first position is taken by item “Brandname XX-2 Yadda Ladida”

Brandname XX-7 Ladida I get the expected result in 7th position; first position is taken by item “Brandname XX-2 Yadda Ladida”

Brandname XX-7 Yadda Ladida I get the expected result AGAIN in 7th position; first position is taken by item “Brandname XX-2 Yadda Ladida”

PS. eveything is case insensitive

what am I doing wrong??? please advise..

this is my managed-schema xml file http://pastebin.com/Z9nc36QD

UPDATE this is an example query searching for “boss dd-7”

JavaScript

Advertisement

Answer

ok, not it works by simply removing this line in my schema

JavaScript

and adding

JavaScript

my final code (consider my field is text_general)

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement