Search/Filter for exact phrase
Search/Filter for exact phrase
Firstly, Thank you for a very robust and adaptable plug-in. These forums hve been a great help with previous configuration and customisations.
I have a need to alter how the default search/filter box performs its query. We can create our own textbox and assign an event (as done with many solutions) and run the fnFilter function from the API. This gets the solution halfway there.
However, it still does the very complex regex AND function (that has been discussed before on the forums - http://datatables.net/forums/comments.php?DiscussionID=255) if no column is specified. We would like to retain the functionality of filtering on multiple columns. for example (content from: http://www.datatables.net/examples/api/multi_filter.html), the global search box will find any items with a combination of "Firefox 1". What we would like to show would be only entries with an exact phrase match to "Firefox 1" (case-insensative). If the same filter is applied to the Browser column, it works as required. REGEX appears to have the same issues, as it will split on the space still...
Would it be possible when doing single column filterrs to perform an OR so if the filter is set to all columns from a custom filter box? It appears that the default behaviour is an AND operator.
Is there someway (without altering the library) to replicate the code to function with the afnFiltering from the API (http://datatables.net/development/filtering). Ideally without recreating the filter code within - joining of columns etc...
How possible is this to achieve? My attempts at drafting a solution have not been fruitful. I have read a number of forum posts on similar quests and it appears that the "desired" functionality is complex.
I have a need to alter how the default search/filter box performs its query. We can create our own textbox and assign an event (as done with many solutions) and run the fnFilter function from the API. This gets the solution halfway there.
However, it still does the very complex regex AND function (that has been discussed before on the forums - http://datatables.net/forums/comments.php?DiscussionID=255) if no column is specified. We would like to retain the functionality of filtering on multiple columns. for example (content from: http://www.datatables.net/examples/api/multi_filter.html), the global search box will find any items with a combination of "Firefox 1". What we would like to show would be only entries with an exact phrase match to "Firefox 1" (case-insensative). If the same filter is applied to the Browser column, it works as required. REGEX appears to have the same issues, as it will split on the space still...
Would it be possible when doing single column filterrs to perform an OR so if the filter is set to all columns from a custom filter box? It appears that the default behaviour is an AND operator.
Is there someway (without altering the library) to replicate the code to function with the afnFiltering from the API (http://datatables.net/development/filtering). Ideally without recreating the filter code within - joining of columns etc...
How possible is this to achieve? My attempts at drafting a solution have not been fruitful. I have read a number of forum posts on similar quests and it appears that the "desired" functionality is complex.
This discussion has been closed.