how do I make Solr/Lucene ignores space? What I want to achieve is to make the search engine match search phrases like, ie. "Hongkong" when only "hong kong" is indexed.
As far as I know I should play with some text-analyzers. I cannot find any good source describing this approach.
Thanks!
The search criteria in your case is different.
You would need to use solr.SynonymFilterFactory and define this combination as synonyms.
Check out the examples in the above link.
That would enable you to search for both hong kong and hongkong and still get the result.
Usually WordDelimiterFilterFactory would be used for combinations without space.
It is used for situations like change in case or alphanumeric combinations where you want to search with any combination.
e.g.
Wi-fi should be searchable by wifi, wifi, wi fi etc ....
iPhone should be searchable as iphone, iPhone, i phone etc ...
j2se searchable by j2se, j 2 se etc ...