Skip to main content
Inspiring
July 24, 2014
Question

cfsearch filename

  • July 24, 2014
  • 1 reply
  • 319 views

Is there a way to retrieve just the document filename without the appended url path from a cfsearch?

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    July 25, 2014

    Questions:

    • what, if anything, have you specified on the URLPath attribute of your cfindex?
    • what column are you referring to in your cfsearch results?   You might want to post a sample of what you get if you dump out a row from the results so we can see all the columns.

    Couple of ideas.

    • You could use the custom1..4 attributes when doing the cfindex to populate the collection with those filenames.  These can then be referenced in your cfsearch results.
    • Or, you could use a simple regex to extract just the filename, or even something like listLast(url, "/")