Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature/full text search #1136
This PR introduces MVP for MAM full text search. Currently it works only with ODBC and Riak backends and its very limited when comes to text matching. This is NOT an extension to the standard. Current MAM XEP-0313 allows for queries using "forms" that may contain any server-defined fields, therefore simple field named 'full-text-search' was introduced in order to provide this feature.
The following stanza shows a example MAM stanza that uses full text search:
Full Text Search is an optional server-side feature. To find out whether its supported, client may query server about active form fields for MAM stanza:
The response shows which form fields may be used to filter MAM messages (that includes required fields i.e. with, start and end):
While reading PR you may want to skip "Make Elvis happy" commit to get rid of code quality changes.
This is very good job, thanks! I really appreciate you also added the search feature to Riak's backend. Here are my general comments also:
- The PR description is not up-to-date (doesn't say about Riak backend)
- It would be very valuable if you could add an example stanza in the PR desc so it's easy for client devs to see and understand how to use this feature.
- It would be perfect if the search feature were optional. There maybe some installations where the packet format is in fact sth encrypted (that's why the packet's format is configurable). In such situation we don't want to keep the body in plain text. Also for setups where the search feature is not needed, disabling it will safe some storage space.
There's still documentation missing, with focus on what happens when full-text search is turned on (and a note that turning it on won't make old messages searchable).