Smart filtering does not work on Server Side processing

Smart filtering does not work on Server Side processing

diptadipta Posts: 1Questions: 0Answers: 0
edited January 2012 in General
Hi Allan, first of all thank you for this code, it is a very2 useful tool! great job! :)

I use datatable mostly for server side processing. When I tried to filter some data, it works very well except that it doesn't work as 'smart filtering' says. I was afraid that I've changed some properties in my code unintentionally.
But then I tried to check it on your example here http://datatables.net/release-datatables/examples/server_side/server_side.html . There's a record 'psp browser' on the tabel, so I typed 'browser psp' to check the smart filtering, but no matching records found.

does the smart filtering indeed not work on server side processing? or are there any properties to make it works?
thank you in advance, Allan, keep up the good work!

Replies

  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    Generally speaking no, smart filtering does not work server-side. The demo script for server-side processing has this comment ( https://github.com/DataTables/DataTables/blob/master/examples/server_side/scripts/server_processing.php#L77 ):

    [code]
    /*
    * Filtering
    * NOTE this does not match the built-in DataTables filtering which does it
    * word by word on any field. It's possible to do here, but concerned about efficiency
    * on very large tables, and MySQL's regex functionality is very limited
    */
    [/code]

    Now having said that, I have actually implemented something very similar in the past for the server-side processing script :-). Have a look at this post (and the thread in general): http://www.datatables.net/forums/discussion/3343/server-side-processing-and-regex-search-filter/p1#Item_23 . It breaks the search string up into words, so it does basically the same thing as smart filtering.

    So short answer is, yes it will work, but you need to modify the script :-)

    Allan
This discussion has been closed.