D16826: Treat uints and doubles the same as integers

2018-12-02 Thread Alexander Stippich
astippich updated this revision to Diff 46679.
astippich added a comment.


  - only add uints for now

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16826?vs=46625=46679

BRANCH
  uint_double

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

AFFECTED FILES
  src/file/extractor/result.cpp

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


D16826: Treat uints and doubles the same as integers

2018-12-01 Thread Stefan Brüns
bruns added a comment.


  Yes, UInt should be fine (actually, all our current integral numeric 
properties **are** unsigned).

REPOSITORY
  R293 Baloo

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

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


D16826: Treat uints and doubles the same as integers

2018-12-01 Thread Alexander Stippich
astippich added a comment.


  Okay, so there is more work to do for floats. What about then reducing this 
patch to uints for now, and doubles are added when everything else is in place?
  I have something in the pipeline for the Result class, which I added for 
figuring out how string lists are handled, I can probably post that tomorrow. I 
could then extend the test for floats

REPOSITORY
  R293 Baloo

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

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


D16826: Treat uints and doubles the same as integers

2018-12-01 Thread Stefan Brüns
bruns added a comment.


  I think support for non-integers is useful in general, but there are a few 
things we should consider:
  
  Currently, only integral numbers can be searched. For floats, we definitely 
want Less/Greater matches to work, exact matches for floats are not very useful.
  
  As you are referring to the TermGenerator, I suppose the (float) variant gets 
converted to something like "-5.73",  which is mangled by the TermGenerator to 
something like "X42-5.73", i.e. dropping the sign? (See D17284 
)
  
  Ideally, this were backed by some unit tests. The comparision test can be 
added to the postingdbtest, but AFAICS there are currently no tests covering 
`Baloo::Result`

REPOSITORY
  R293 Baloo

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

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


D16826: Treat uints and doubles the same as integers

2018-12-01 Thread Nathaniel Graham
ngraham added a reviewer: Baloo.
ngraham added a comment.


  Makes sense to me, but let's let @bruns have the final say.

REPOSITORY
  R293 Baloo

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

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


D16826: Treat uints and doubles the same as integers

2018-12-01 Thread Alexander Stippich
astippich added a comment.


  @bruns do you consider this useful or shall I abandon?

REPOSITORY
  R293 Baloo

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

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


D16826: Treat uints and doubles the same as integers

2018-12-01 Thread Alexander Stippich
astippich updated this revision to Diff 46625.
astippich added a comment.


  - rebase

REPOSITORY
  R293 Baloo

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16826?vs=45314=46625

BRANCH
  uint_double

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

AFFECTED FILES
  src/file/extractor/result.cpp

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