How do JQuery DataTable Search Works?
How do JQuery DataTable Search Works?

Hi,
I am looking for explanation of how the search works.. I have this table when the search is performed it doesn't show the expected result.
here is the example http://jsfiddle.net/yesterdaysfoe/b57foa72/1/
when you try to search "store a"
my expected result should be "No matching records found"
but it display 1 row which is the "Store 1, Branch b"
Is this a bug or Does it really what it should be?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
No bug - you are searching for
store
anda
, both of which are found in the string "Store 1, Branch b".If you want to limit the searching to matching at the start of a word only, you would need to use a custom regular expression.
Allan
After some reading, I now barely understand how it works, and yes, you were right about breaking my search input word by word because as default search.smart is enable.
I just set search.smart option to false to meet my expected result.
$('#example').dataTable( {
"search": {
"smart": false
}
} );
link: https://datatables.net/reference/option/search.smart
Thanks.