datatables search , ignore regex

datatables search , ignore regex

imacoolguyfulimacoolguyful Posts: 17Questions: 5Answers: 0

I have a datatables with 9 columns, I have back end server and pagination enabled. It seems that when I search any of the individual columns they're usually pretty fast 5-10 seconds. Although when searching the URL column specifically, there is usually a long delay or it times out all together. I believe this is because the columns are somehow thinking it is regex because of the format of the url, for example: **https://datatables.net/forums/post/question/ ** if I was to search for this url it would be very slow and usually time out. However, If i search for forums/post/question, it would be nearly instant. Is there a way to ignore regex in column searches or another solution for this problem?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I assume you're calling column().search(), the second parameter determines whether it's a regular expression, though the default is false. It might be SQL script on the server, so you could always strips those asterisks out before issuing the query.

    Colin

This discussion has been closed.