No results for Query with Spaces

Hi,

I’ve got an index with article-numbers. When I perform a search with a space inside, algolia will not find the number when it is saved without space.

e.g. This are the saved article-numbers:
123456-100
123456-002
123456-003
123456-600
123456-001
123456903

Searches:
123456 = all articles found
123456 903 = only the first 5 articles are found -> the last article (which is the correct ony) is not found only when I search for 123456903 I’ll get a hit.

Is it possible to tell algolia it should also search for “123456903” when the original query is “123456 903”?

Thanks a log

Eugen

Hi Eugen,

Technically a space is considered a separator, so the engine will return everything that starts with 123456 and start with 903.

I guess you’re asking because there is a good reason why people would had a space there. Do you think something like “ignore spaces if all characters are numeric” would work for you?

What technology do you use? (instantsearch, php client,…)

Hi Julian, thanks for your reply. I use both - instantsearch and the php-client.

A features like “ignore spaces if all characters are numeric” would not help, because I also have alphanumeric queries with the same problem. I think the best way would be an “OR”-search. Then I could enhance the query and add a second search-term like “123456 903 OR 123456903”. Is it possible to make a OR-search?

Thanks

Eugen