synchrony / smsn-mode

Emacs client for Semantic Synchrony knowledge graphs
GNU General Public License v3.0
11 stars 6 forks source link

added simple "fuzzy" title fulltext search #23

Closed rsuhada closed 7 years ago

rsuhada commented 7 years ago

Hi,

For your consideration: I've added a very simple fulltext function that wraps the input query with * wildcards. It's like a (very very dumb) fuzzy search.

Reason: most of the time I don't remember exactly what is the nodes title I'm looking for, so end up adding * to my query. This automatizes it.

joshsh commented 7 years ago

This seems useful! Two nits:

1) can you tweak the function description to distinguish it from the default full-text search? 2) what happens when the search term contains one or more spaces? Can you wrap each space-separated term in "*"s?

joshsh commented 7 years ago

I will make these changes after merge, as I'm about to release. Thanks for the PR.

joshsh commented 7 years ago

See https://github.com/synchrony/smsn-mode/commit/a07c851d8c9654802484133ca6b0e91b67030953

"Fuzzy" search can now be enabled by setting a constant in your Emacs init file:

(defconst smsn-const-query-by-partial-title t)

The example init file includes this setting.