Indexing and Searching in filenames

Hello,

Actually I try to build a full text index that store filenames and other datas.

When I try to search in filenames I’ve got some strange results.

For example if I search 123456.pdf, I found my result, but if I search 123456 or 123456* I don’t find it.

Another strange behavior is that If I search *.pdf, I will find other results like test.pdf, but not 123456.pdf

I suspect that it’s because of the dot in the filename and because there are some numbers before it.

Do you have any clue?

Thanks a lot

Hey,

This is mostly a side effect of the analyser you used for the filename 's field in the index.
Are you using simple analyser?
Simple analyser would throw away the “123456” and only take the token "pdf "

Can you try standard analyser for this field?
Standard analyser would create two tokens out of the text “123456.pdf” ,
like “123456” and “pdf”.

It certainly helps if you read a bit about various analysers and their differences .
https://docs.couchbase.com/server/6.0/fts/fts-using-analyzers.html

Cheers!