D13670: Add subseq operator to match sub-sequences

2018-07-08 Thread Michael Eden
michaeleden added a dependent revision: D13988: Use subseq matching for service 
runner.

REPOSITORY
  R309 KService

BRANCH
  feature/match-subseq

REVISION DETAIL
  https://phabricator.kde.org/D13670

To: michaeleden, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13670: Add subseq operator to match sub-sequences

2018-07-08 Thread Michael Eden
michaeleden added a comment.


  @dfaure you can land it its no problem. I'm also not in a rush to get it into 
5.48 or anything (Bug 262837 is from 2011).
  I have a few diffs in review, I think I'll apply for a dev account since I'd 
like to keep doing this stuff.

REPOSITORY
  R309 KService

BRANCH
  feature/match-subseq

REVISION DETAIL
  https://phabricator.kde.org/D13670

To: michaeleden, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13670: Add subseq operator to match sub-sequences

2018-07-08 Thread Michael Eden
michaeleden added a comment.


  @dfaure I don't believe I have permission to edit the wiki, can I make a 
revision against it somehow?

REPOSITORY
  R309 KService

BRANCH
  feature/match-subseq

REVISION DETAIL
  https://phabricator.kde.org/D13670

To: michaeleden, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13747: Fuzzy filename search for Baloo

2018-07-07 Thread Michael Eden
michaeleden added a comment.


  @bruns should I continue with this implementation and add dbs and such? And 
do the tests make sense?

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D13747

To: michaeleden, vhanda, #baloo
Cc: bruns, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, abrahams


D13670: Add subseq operator to match sub-sequences

2018-07-07 Thread Michael Eden
michaeleden updated this revision to Diff 37301.
michaeleden added a comment.


  Respond to @dfaure comments by adding tests and separating subseq func

REPOSITORY
  R309 KService

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13670?vs=36493&id=37301

BRANCH
  feature/match-subseq

REVISION DETAIL
  https://phabricator.kde.org/D13670

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/kservicetest.cpp
  autotests/kservicetest.h
  src/services/ktraderparse.cpp
  src/services/ktraderparse_p.h
  src/services/ktraderparsetree.cpp
  src/services/ktraderparsetree_p.h
  src/services/lex.l
  src/services/yacc.y

To: michaeleden, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13747: Fuzzy filename search for Baloo

2018-06-28 Thread Michael Eden
michaeleden updated this revision to Diff 36811.
michaeleden added a comment.


  Add fuzzy search class separate from db and make tests to demonstrate 
algorithm

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D13747?vs=36724&id=36811

BRANCH
  feature/fuzzy-search

REVISION DETAIL
  https://phabricator.kde.org/D13747

AFFECTED FILES
  autotests/unit/engine/CMakeLists.txt
  autotests/unit/engine/fuzzysearchtest.cpp
  src/engine/CMakeLists.txt
  src/engine/database.cpp
  src/engine/databasedbis.h
  src/engine/fuzzydb.cpp
  src/engine/fuzzydb.h
  src/engine/fuzzysearch.cpp
  src/engine/fuzzysearch.h
  src/engine/transaction.cpp

To: michaeleden, vhanda, #baloo
Cc: bruns, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, abrahams


D13747: Fuzzy filename search for Baloo

2018-06-26 Thread Michael Eden
michaeleden added a comment.


  @bruns decoupling makes sense, but eventually there will be a need for a db 
right?
  And I will definitely make those test cases, but I may ask for some help on 
how they're done in baloo.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D13747

To: michaeleden, vhanda, #baloo
Cc: bruns, kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, 
spoorun, ngraham, abrahams


D13747: Fuzzy filename search for Baloo

2018-06-26 Thread Michael Eden
michaeleden added a reviewer: Baloo.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D13747

To: michaeleden, vhanda, #baloo
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D13747: Fuzzy filename search for Baloo

2018-06-26 Thread Michael Eden
michaeleden created this revision.
michaeleden added a reviewer: vhanda.
Restricted Application added projects: Frameworks, Baloo.
Restricted Application added subscribers: Baloo, kde-frameworks-devel.
michaeleden requested review of this revision.

REVISION SUMMARY
  This is a proof of concept fuzzy search (only for filenames) based on 
bigrams. It's still not integrated into baloo or optimized, but I'm creating a 
diff to ask if I'm on the right track here or not. What's missing:
  
  1. Integration into baloo as a search method
  2. Ranking of fuzzy results
  3. Journal of indexed files (to effeciently see if a file's been indexed yet)
  4. Hook into `baloo_file` to gradually index files
  
  Let me know what else I need or if you'd rather have a different fuzzy 
matching algorithm.

REPOSITORY
  R293 Baloo

BRANCH
  feature/fuzzy-search

REVISION DETAIL
  https://phabricator.kde.org/D13747

AFFECTED FILES
  src/engine/CMakeLists.txt
  src/engine/database.cpp
  src/engine/databasedbis.h
  src/engine/fuzzydb.cpp
  src/engine/fuzzydb.h
  src/engine/transaction.cpp

To: michaeleden, vhanda
Cc: kde-frameworks-devel, #baloo, ashaposhnikov, michaelh, astippich, spoorun, 
ngraham, bruns, abrahams


D13670: Add subseq operator to match sub-sequences

2018-06-24 Thread Michael Eden
michaeleden added a comment.


  @dfaure if a user was trying to find `LibreOffice 6.0 Writer`
  
  with `subin` they would have type `libre` to narrow it down to LibreOffice 
programs, then `libreoffice 6.0 writer` to get to that application.
  with `subseq` they can type `libre` to get to LibreOffice programs but then 
just have `librewrite` match with `LibreOffice 6.0 Writer`
  
  This is related to Bug 262837 

REPOSITORY
  R309 KService

REVISION DETAIL
  https://phabricator.kde.org/D13670

To: michaeleden, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13670: Add subseq operator to match sub-sequences

2018-06-22 Thread Michael Eden
michaeleden added a reviewer: Frameworks.

REPOSITORY
  R309 KService

REVISION DETAIL
  https://phabricator.kde.org/D13670

To: michaeleden, dfaure, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D13670: Add subseq operator to match sub-sequences

2018-06-21 Thread Michael Eden
michaeleden created this revision.
michaeleden added a reviewer: dfaure.
Restricted Application added a project: Frameworks.
Restricted Application added a subscriber: kde-frameworks-devel.
michaeleden requested review of this revision.

REVISION SUMMARY
  Added `subseq` and `~subseq` operators which match subsequences of strings.
  This is useful to filter out matches quicker:
  
$ ktraderclient5 --constraint "'libremath' ~subseq Name" --servicetype 
'Application' --short
servicetype is : Application
constraint is : 'libremath' ~subseq Name
got 1 offers.

/nix/store/zq1kgdxk426qgf06nzpd7xqkpk4z5hh2-system-path/share/applications/math.desktop

TEST PLAN
  I'll need help knowing where tests for this will go.

REPOSITORY
  R309 KService

BRANCH
  feature/match-subseq

REVISION DETAIL
  https://phabricator.kde.org/D13670

AFFECTED FILES
  src/services/ktraderparse.cpp
  src/services/ktraderparse_p.h
  src/services/ktraderparsetree.cpp
  src/services/ktraderparsetree_p.h
  src/services/lex.l
  src/services/yacc.y

To: michaeleden, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns