File-based Indexes with ColdFusion - a quick tip

Hopefully this saves someone else if they resort to a Google search. Using the cfindex tag to index file documents? If you leave the extensions attribute off, which you can, since it is optional, ColdFusion will index nothing. If you add extensions="*", ColdFusion will index nothing. The right fix? Use extensions=".*". (Edit: In case it isn't clear, that was .* as the value. Dot Star. Period Asterisk. You get the idea. ;)

Obvious - right?

By the way, don't forget you can use the status attribute to get a result struct showing you exactly how many items were modified in your index. This is incredibly useful when debugging.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate for Extend by Auth0. He focuses on serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support.

Lafayette, LA