Search Text with Like

Hi All,
sorry for my english.

I have a particular question:
i have a this structure bucket:
{
“filename”: “name_file”,
“path”: “path_where_there_is_filename”
}

and in this bucket there are 170,00 documents.

For search a specific filename i use the Full Text Indexes (is perfect solution).
But the problem is if i want to search a inside part of filename.

If i make a query like this:
“SELECT *` FROM bucket_name WHERE filename LIKE ‘%text%’”

the execution time is about 8 seconds.

Then i think to use the indexs, but I can not think of how to structure them.

Have you any idea?

Thank you

Check this out https://dzone.com/articles/a-couchbase-index-technique-for-like-predicates-wi
https://dzone.com/articles/more-than-like-efficient-json-search-with-couchbas

Hi @vsr1,
thank’s for the response, they are a valid alternative solution, but doesn’t resolve my problem becauase the execution time remains high
In effect the first solution ( A Couchbase Index Technique for LIKE Predicates With Wildcard - DZone) the time execution is 12sec.
The second is slightly lower, the time is 7,75 sec.
Does somebody else have any other idea for lower this execution time?